Yes most definitely. I am working with a client that has decided to combine several dozen district databases into one, and is using a district id along with a (generated) primary key for every row in their new database. This means composite keys with one part of the key autogenerated. Unfortunately I am running into the same issue. For unsaved objects there is a primary key embedded id object that is never null. The autogenerated part is zero for
an unsaved instance, and when there are more than one of these in the persistence context hibernate cannnot distinguish the two.
Yes most definitely. I am working with a client that has decided to combine several dozen district databases into one, and is using a district id along with a (generated) primary key for every row in their new database. This means composite keys with one part of the key autogenerated. Unfortunately I am running into the same issue. For unsaved objects there is a primary key embedded id object that is never null. The autogenerated part is zero for
an unsaved instance, and when there are more than one of these in the persistence context hibernate cannnot distinguish the two.
AFAIK this is a bug. Please fix.