Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjIxYzRhNmY2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15629?atlOrigin=eyJpIjoiNjIxYz...
) HHH-15629 (
https://hibernate.atlassian.net/browse/HHH-15629?atlOrigin=eyJpIjoiNjIxYz...
) Tolerate @XxxxToOne @JoinTable with no explicit join table name (
https://hibernate.atlassian.net/browse/HHH-15629?atlOrigin=eyJpIjoiNjIxYz...
)
Issue Type: Bug Affects Versions: 6.1.4 Assignee: Unassigned Created: 26/Oct/2022 00:49 AM
Priority: Minor Reporter: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Hibernate will happily infer a name for a many-valued association with a @JoinTable with
no name member, exactly as specified by JPA. But for some reason it apparently refuses to
do this for a single-valued association. This seems inconsistent, and arguably even goes
against the spec. It’s surely very easy to fix: just infer a name.
The Javadoc and spec say:
Defaults to the concatenated names of the two associated primary entity
tables, separated by an underscore.
This is a bit ambiguous, being silent on the order of the table names! But I think we can
extrapolate from sections 2.10.5.x that the rule is that the “owner” of the association
comes first. (A @ManyToOne is always the owner.)
(
https://hibernate.atlassian.net/browse/HHH-15629#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15629#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:6031644 )