huang di (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63e6330...
) *commented* on HHH-16054 (
https://hibernate.atlassian.net/browse/HHH-16054?atlOrigin=eyJpIjoiMTM2OT...
)
Re: JPA / Hibernate, duplicate pkey error when updating entity that is a subclass of a
base class that uses IdClass for composite primary key (
https://hibernate.atlassian.net/browse/HHH-16054?atlOrigin=eyJpIjoiMTM2OT...
)
The root cause is that joinedsubclasses use their own attributes to judge whether there is
an idenfierMapper. The correct behavior is to use the attributes of the parent
class(superClass) to judge in the inheritance scenario. canExtractIdOutOfEntity() return
false due to this problem, then the ID is null and the problem occurs.
(
https://hibernate.atlassian.net/browse/HHH-16054#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16054#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#100215- sha1:42926eb )