Jay Ahn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61a6681...
) *commented* on HHH-16313 (
https://hibernate.atlassian.net/browse/HHH-16313?atlOrigin=eyJpIjoiNGNkZj...
)
Re: Throw an appropriate error when a mappedBy property references the wrong entity type (
https://hibernate.atlassian.net/browse/HHH-16313?atlOrigin=eyJpIjoiNGNkZj...
)
Currently I have the below mapping that was working very well in hibernate 5, but now I
got an error by the type check introduced by this ticket.
The reason why I map like this is that I can leverage the efficiency of bidirectional
mapping, and also I don’t need to reference from child to parent. (This probably works
when primary key is generated in server side, not DB as it is determined before I persist
them)
Is it possible to use the below pattern? or there is any workaround at this moment?
@Entity
public static class EntityA {
@Id
private UUID id;
@OneToMany( mappedBy = "entityAId" )
private List<EntityB> twos;
}
@Entity
public static class EntityB {
@Id
private Long id;
private UUID entityAId;
}
(
https://hibernate.atlassian.net/browse/HHH-16313#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16313#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#100225- sha1:85acc52 )