Spring 5 + Hibernate 5 Issue
Budget: $8 – $15 USD
I upgraded a project from Spring and Hibernate 4 to Spring and Hibernate 5.
I have 1 issue with the transactions.
Before the upgrade this line persisted the parent entity and the child entity.
save(preserveTransaction);
After the upgrade it doesn't work, I have this error, because the application only try to persist the child entity, not the parent first.
Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "TR_TRN_EXT_ID_TRN_FKEY: PUBLIC.TR_TRN_EXT FOREIGN KEY(ID_TRN) REFERENCES PUBLIC.TR_TRN(ID_TRN) ('00844202306090011105')"; SQL statement:
FINEST|83680/0|Service Engage|23-06-09 11:37:08|/* insert com.starmount.preserve.arts.v6_0_0.TransactionExtensionEntity */ insert into public.tr_trn_ext (st_fn, st_pl, fl_stg, st_sm, id_trn) values (?, ?, ?, ?, ?) [23506-195]
I have 1 issue with the transactions.
Before the upgrade this line persisted the parent entity and the child entity.
save(preserveTransaction);
After the upgrade it doesn't work, I have this error, because the application only try to persist the child entity, not the parent first.
Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "TR_TRN_EXT_ID_TRN_FKEY: PUBLIC.TR_TRN_EXT FOREIGN KEY(ID_TRN) REFERENCES PUBLIC.TR_TRN(ID_TRN) ('00844202306090011105')"; SQL statement:
FINEST|83680/0|Service Engage|23-06-09 11:37:08|/* insert com.starmount.preserve.arts.v6_0_0.TransactionExtensionEntity */ insert into public.tr_trn_ext (st_fn, st_pl, fl_stg, st_sm, id_trn) values (?, ?, ?, ?, ?) [23506-195]