As required, I used the logging.
Here is my debug for the insertion of my "parent" :
Code:
14:22:36,093 DEBUG BatcherImpl:228 - prepared statement get: insert into PARENTS ([blabla], PK_PARENT) values [blabla], ?)
Hibernate: insert into PARENTS ([blabla], PK_PARENT) values ([blabla], ?)
14:22:36,093 DEBUG BatcherImpl:234 - preparing statement
14:22:36,093 DEBUG EntityPersister:398 - Dehydrating entity: [Parent#47]
[blabla]
14:22:36,109 DEBUG LongType:46 - binding '47' to parameter: 12
The 12th position is my PK_PARENT = 47
Now the debug for the join table :
[code]
14:22:36,171 DEBUG BatcherImpl:228 - prepared statement get: insert into PARENTS_CHILDREN (FK_PARENT, FK_CHILD) values (?, ?)
Hibernate: insert into PARENTS_CHILDREN (FK_PARENT, FK_CHILD) values (?, ?)
14:22:36,171 DEBUG BatcherImpl:234 - preparing statement
14:22:36,187 DEBUG LongType:46 - binding '47' to parameter: 1
14:22:36,187 DEBUG IntegerType:46 - binding '1' to parameter: 2
14:22:36,187 DEBUG BatcherImpl:26 - Adding to batch
14:22:36,187 DEBUG LongType:46 - binding '47' to parameter: 1
14:22:36,187 DEBUG IntegerType:46 - binding '0' to parameter: 2
14:22:36,187 DEBUG BatcherImpl:26 - Adding to batch
14:22:36,187 DEBUG BasicCollectionPersister:570 - done inserting collection
14:22:36,187 DEBUG BatcherImpl:48 - Executing batch size: 2
14:22:36,218 DEBUG JDBCExceptionReporter:36 - SQL Exception
java.sql.BatchUpdateException: ORA-02291: violation de contrainte (USER.PARENTS_CHILDREN_1) d'int