[hibernate-dev] Unidirectional @OneToMany @JoinColumn associations

Gail Badner gbadner at redhat.com
Wed May 30 02:32:31 EDT 2018


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 use such mappings will not
be portable."

I don't see anything in the user doc that explicitly states that Hibernate
does not support this.

Is this considered a bug?

Also, what about a unidirectional OneToMany using a @JoinColumn that
references some, but not all, of primary key columns? Hibernate does not
support that either. Should Hibernate support it since they are primary key
columns?

Thanks,
Gail


More information about the hibernate-dev mailing list