Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16212 (
https://hibernate.atlassian.net/browse/HHH-16212?atlOrigin=eyJpIjoiYjA2NT...
)
Re: UnknownTableReferenceException with one-to-many relationship mapped by another entity
(
https://hibernate.atlassian.net/browse/HHH-16212?atlOrigin=eyJpIjoiYjA2NT...
)
Hello Steve Webber (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63f359a...
) , thanks for reporting the issue and providing a reproducer!
Entity 1 has a one-to-many relationship on Entity 2, mapped by Entity 3
This is not a valid mapping. In your example project, TableOneEntity 's associated
collection twos is mappedBy a property of an unrelated type ( TableThreeEntity ). This
cannot work as the property in the owning side of a bidirectional association (
TableTwoEntity ) which is referenced mappedBy *must* be of the same type of the inverse
side of the association ( TableOneEntity ).
You can find more detailed information in the User Guide (
https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibern...
).
(
https://hibernate.atlassian.net/browse/HHH-16212#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16212#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#100217- sha1:58f696e )