mea culpa!
The problem was related to the fact I'm using a SortedSet of entities B, which implement the Comparable interface, where the compareTo only had two cases: bigger or smaller, but I didn't implemented the equals case.
This lead to a strange situation in the org.hibernate.action.CollectionUpdateAction, where it does...
persister.deleteRows( collection, id, session );
persister.updateRows( collection, id, session );
persister.insertRows( collection, id, session );
this deleteRows deleted all the entries from the first transaction, because it compared the existing ones when commiting the transaction with the ones loaded previously, and no one matched because compareTo was allways different!
Thanks for your patience ;-)
Marc
|