The only referenced column is one of the *primary* key columns. I left
out the word "primary" in my previous reply.
To make sure I understand, are you saying that a primary key column
isn't a primary key column when part of a composite primary key? In
other words, only the complete set of prima
The spec says " referenced columns that are not primary key
columns...". Nothing in here says full or partial.
I completely agree with Sanne - its not a bug and it is something we have
never supported.
On Wed, May 30, 2018 at 3:44 PM Stephen Fikes wrote:
> The referenced attributes *are* k
The referenced attributes *are* key attributes .. just a subset of the
key. So ... odd mapping ... but I don't think it is included in the
"optional" category for JPA 2.x.
Stephen
On 05/30/2018 03:39 PM, Sanne Grinovero wrote:
> Hi Gail,
>
> I would not consider it a bug to not have documented
Hi Gail,
I would not consider it a bug to not have documented that we don't
support some non-mandatory feature.
And it's still optional in JPA 2.2, so I think we're good.
Thanks,
Sanne
On 30 May 2018 at 19:45, Gail Badner wrote:
> Hi Vlad,
>
> Thanks for your answer. There are definitely bet
Hi Vlad,
Thanks for your answer. There are definitely better ways to model this
association.
WRT the second example, where the referenced columns are a subset of the PK
columns -- I understand there are better ways to model this.
In particular, since the subset of PK columns needs to be unique (
Hi,
For the OneToMany with @JoinColumn, the user can workaround this limitation
by just using the @ManyToOne on the child side on any column they want
and turning the unidirectional association into a bidirectional one. I
remember I tested it and it worked just fine.
For the OneToMany with @Join
Unidirectional OneToMany associations using @JoinColumn that reference
columns that are not PK columns is not currently supported.
The JPA 2.1 documentation for @JoinTable says:
"Support for referenced columns that are not primary key columns of the
referenced table is optional. Applications that