[hibernate-issues] [JIRA] (HHH-13836) OneToOne Unidirectional relation does not work properly

Armand Sciberras (JIRA) jira at hibernate.atlassian.net
Wed Jun 3 06:22:15 EDT 2020


Armand Sciberras ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A4761275c-dc2f-4f24-9699-24839a93926c ) *commented* on HHH-13836 ( https://hibernate.atlassian.net/browse/HHH-13836?atlOrigin=eyJpIjoiYjM3ZmMwMjVjODViNDUyOGEyN2QwZDAyNmEyNDFlZjQiLCJwIjoiaiJ9 )

Re: OneToOne Unidirectional relation does not work properly ( https://hibernate.atlassian.net/browse/HHH-13836?atlOrigin=eyJpIjoiYjM3ZmMwMjVjODViNDUyOGEyN2QwZDAyNmEyNDFlZjQiLCJwIjoiaiJ9 )

Any updates on this please?

We also bumped into this same situation. Upon persisting, the ChildEntity}}is attempted insert before{{ParentEntity}}causing the foreign key defined in {{ChildEntity}}to fail. The only way we managed to go around it, is by converting from Unidirectional to Bidirectional (which we would like to avoid if possible). This worked because hibernate now picks up mappedBy in{{ParentEntity}}and {{foreignKeyDirection}}is now {{TO_PARENT

Sadly, stopping at 5.3.10 is not an option for us as we were effected by: https://hibernate.atlassian.net/browse/HHH-12436 Also going to 5.2.10 where ( HHH-12436 ( https://hibernate.atlassian.net/browse/HHH-12436 ) Closed ) is not present is not an option either as we need Java11 support.

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

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#100128- sha1:03ebdb2 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200603/73f86918/attachment.html 


More information about the hibernate-issues mailing list