I have a table which has composite primary key consisting one sequence and two foreign keys I am able to persist My entity class but it is not generating according to the se
There's one workaround for this issue. I've faced the same condition, have 4 fields as composite keys, out of which 1 need to be generated by sequence. I've not created Embedded class at all, only have 1 @Id field which need to be generated by sequence. Rest all field values will be simple columns, as referential integrity are enforced in DB and also I'm checking values of rest of 3 fields in code to be not null.
In case of error the transaction will rollback.