one more:
when changing mapping to (with cascade=all):
<bag name="RwpXVersRelevants" lazy="true" cascade="all">
as you can see in the debug-trace, there is first an "update" and later a "delete" (which will never work work because of the previous update).
...
DEBUG net.sf.hibernate.collection.AbstractCollectionPersister,477 - Deleting collection: [de.bmw.catia.model.data.VersRel.RwpXVersRelevants#8]
DEBUG net.sf.hibernate.impl.BatcherImpl,200 - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG net.sf.hibernate.impl.BatcherImpl,226 - update RWP_X_VERS_RELEVANT set IDRELV=null where IDRELV=?
DEBUG net.sf.hibernate.impl.BatcherImpl,249 - preparing statement
DEBUG net.sf.hibernate.type.NullableType,46 - binding '8' to parameter: 1
DEBUG net.sf.hibernate.impl.BatchingBatcher,28 - Adding to batch
DEBUG net.sf.hibernate.collection.AbstractCollectionPersister,493 - done deleting collection
DEBUG net.sf.hibernate.impl.BatchingBatcher,50 - Executing batch size: 1
DEBUG net.sf.hibernate.impl.BatchingBatcher,58 - success of batch update unknown: 0
DEBUG net.sf.hibernate.impl.BatcherImpl,207 - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG net.sf.hibernate.impl.BatcherImpl,269 - closing statement
DEBUG net.sf.hibernate.persister.EntityPersister,570 - Deleting entity: [de.bmw.catia.model.data.RwpXVersRelevant#catiaVariable = '1 - ChangeNameOnReplace=', versRel = 'de.bmw.catia.model.data.VersRel@1db9f45', isDeleted = 'false', isRelevant = 'false', text = 'null']
DEBUG net.sf.hibernate.impl.BatcherImpl,200 - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG net.sf.hibernate.impl.BatcherImpl,226 - delete from RWP_X_VERS_RELEVANT where IDVAR=? and IDRELV=?
...
|