[hibernate-issues] [JIRA] (HHH-12997) @OneToMany does not work with @JoinFormula

Nathan Xu (JIRA) jira at hibernate.atlassian.net
Wed Apr 22 18:14:54 EDT 2020


Nathan Xu ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af1c90216-c2ff-4df7-8e20-9d0e140d7f64 ) *commented* on HHH-12997 ( https://hibernate.atlassian.net/browse/HHH-12997?atlOrigin=eyJpIjoiNTJlODIxYTBjMWY5NDJhN2JhNDJjYjVjNDA3MjBlODEiLCJwIjoiaiJ9 )

Re: @OneToMany does not work with @JoinFormula ( https://hibernate.atlassian.net/browse/HHH-12997?atlOrigin=eyJpIjoiNTJlODIxYTBjMWY5NDJhN2JhNDJjYjVjNDA3MjBlODEiLCJwIjoiaiJ9 )

From https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#associations-JoinFormula , it seems the annotated field should be some column field in child class. You are using it on parent class and I am almost certain such feature would never be supported, for basically the mechanism aims to provide a customized foreign key, so using it on child class’s ManyToOne field does make sense.

( https://hibernate.atlassian.net/browse/HHH-12997#add-comment?atlOrigin=eyJpIjoiNTJlODIxYTBjMWY5NDJhN2JhNDJjYjVjNDA3MjBlODEiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-12997#add-comment?atlOrigin=eyJpIjoiNTJlODIxYTBjMWY5NDJhN2JhNDJjYjVjNDA3MjBlODEiLCJwIjoiaiJ9 )

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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:0a83519 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200422/8c8223a3/attachment.html 


More information about the hibernate-issues mailing list