| Hi Ben, thank you to have submitted the issue. I tried to reproduce the case in https://github.com/fax4ever/hibernate-play/tree/master/hibernate-compositeid-play. The strategy you’re using is Identity, here is its description according to JPA:
/**
* Indicates that the persistence provider must assign
* primary keys for the entity using a database identity column.
*/
IDENTITY
but we should have a multiple column primary key with a composite id:
create table EVNT_MILSTN (
EVNT_ID bigint not null,
EVNT_MILSTN_ID bigint not null,
primary key (EVNT_ID, EVNT_MILSTN_ID)
)
Using an other strategy it seems work out. But maybe I did reproduce exactly your case, since I had to extend the code you provided. Let me know if that can make sense for you. Thank you again Fabio |