Code:
40937 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - initializing collection [sitemppo.business.datamodel.TestItem.testStructures#226]
40937 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - checking second-level cache
40937 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - collection not cached
40937 [main] DEBUG org.hibernate.loader.Loader - loading collection: [sitemppo.business.datamodel.TestItem.testStructures#226]
40937 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
40937 [main] DEBUG org.hibernate.SQL - select teststruct0_.itemid as itemid1_, teststruct0_.structureid as structur1_1_, teststruct1_.StructureID as Structur1_4_0_, teststruct1_.changedby as changedby4_0_, teststruct1_.changedon as changedon4_0_, teststruct1_.previousVersion as previous5_4_0_, teststruct1_.majorVersion as majorVer6_4_0_, teststruct1_.minorVersion as minorVer7_4_0_, teststruct1_.label as label4_0_, teststruct1_.branch as branch4_0_, teststruct1_.latest as latest4_0_, teststruct1_.createdby as createdby4_0_, teststruct1_.createdon as createdon4_0_, teststruct1_.description as descrip13_4_0_, teststruct1_.name as name4_0_, teststruct1_.projectid as projectid4_0_ from sitemppo60.Structure_Item teststruct0_ left outer join sitemppo60.Structure teststruct1_ on teststruct0_.structureid=teststruct1_.StructureID where teststruct0_.itemid=?
40937 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
40969 [main] DEBUG org.hibernate.type.LongType - binding '226' to parameter: 1
41016 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
41016 [main] DEBUG org.hibernate.loader.Loader - result set contains (possibly empty) collection: [sitemppo.business.datamodel.TestItem.testStructures#226]
41016 [main] DEBUG org.hibernate.engine.CollectionLoadContext - uninitialized collection: initializing
41016 [main] DEBUG org.hibernate.loader.Loader - processing result set
41016 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
41031 [main] DEBUG org.hibernate.type.LongType - returning '37' as column: Structur1_4_0_
41031 [main] DEBUG org.hibernate.loader.Loader - result row: EntityKey[sitemppo.business.datamodel.TestStructure#37]
41031 [main] DEBUG org.hibernate.loader.Loader - Initializing object from ResultSet: [sitemppo.business.datamodel.TestStructure#37]
41031 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [sitemppo.business.datamodel.TestStructure#37]
41031 [main] DEBUG org.hibernate.type.LongType - returning '12' as column: changedby4_0_
41031 [main] DEBUG org.hibernate.type.TimestampType - returning null as column: changedon4_0_
41031 [main] DEBUG org.hibernate.type.LongType - returning null as column: previous5_4_0_
41031 [main] DEBUG org.hibernate.type.StringType - returning null as column: majorVer6_4_0_
41031 [main] DEBUG org.hibernate.type.ShortType - returning '1' as column: minorVer7_4_0_
41031 [main] DEBUG org.hibernate.type.StringType - returning null as column: label4_0_
41031 [main] DEBUG org.hibernate.type.ShortType - returning '0' as column: branch4_0_
41047 [main] DEBUG org.hibernate.type.BooleanType - returning 'false' as column: latest4_0_
41047 [main] DEBUG org.hibernate.type.LongType - returning '12' as column: createdby4_0_
41047 [main] DEBUG org.hibernate.type.TimestampType - returning '2006-05-12 15:10:08' as column: createdon4_0_
41047 [main] DEBUG org.hibernate.type.StringType - returning '' as column: descrip13_4_0_
41047 [main] DEBUG org.hibernate.type.StringType - returning 'teststructure' as column: name4_0_
41047 [main] DEBUG org.hibernate.type.LongType - returning '12' as column: projectid4_0_
41047 [main] DEBUG org.hibernate.type.LongType - returning '226' as column: itemid1_
41047 [main] DEBUG org.hibernate.loader.Loader - found row of collection: [sitemppo.business.datamodel.TestItem.testStructures#226]
41047 [main] DEBUG org.hibernate.engine.CollectionLoadContext - reading row
41062 [main] DEBUG org.hibernate.type.LongType - returning '37' as column: structur1_1_
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - loading entity: [sitemppo.business.datamodel.TestStructure#37]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - entity proxy found in session cache
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [sitemppo.business.datamodel.TestStructure#37]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - resolved object in session cache: [sitemppo.business.datamodel.TestStructure#37]
41062 [main] WARN org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog - Narrowing proxy to class sitemppo.business.datamodel.TestStructure - this operation breaks ==
41062 [main] DEBUG org.hibernate.loader.Loader - done processing result set (1 rows)
41062 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
41062 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
41062 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
41062 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
41062 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving associations for [sitemppo.business.datamodel.TestStructure#37]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - loading entity: [sitemppo.business.datamodel.User#12]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - entity proxy found in session cache
41062 [main] DEBUG org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[sitemppo.business.datamodel.Structure.nextVersions#37]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - loading entity: [sitemppo.business.datamodel.User#12]
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - entity proxy found in session cache
41062 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [sitemppo.business.datamodel.User#12]
41078 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - resolved object in session cache: [sitemppo.business.datamodel.User#12]
41078 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - loading entity: [sitemppo.business.datamodel.Project#12]
41078 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - entity proxy found in session cache
41078 [main] DEBUG org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[sitemppo.business.datamodel.TestStructure.testItems#37]
41078 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - adding entity to second-level cache: [sitemppo.business.datamodel.TestStructure#37]
41078 [main] DEBUG org.hibernate.cache.ReadWriteCache - Caching: sitemppo.business.datamodel.Structure#37
41078 [main] DEBUG org.hibernate.cache.EhCache - key: sitemppo.business.datamodel.Structure#37
41078 [main] DEBUG net.sf.ehcache.store.MemoryStore - sitemppo.business.datamodel.StructureCache: MemoryStore hit for sitemppo.business.datamodel.Structure#37
41078 [main] DEBUG net.sf.ehcache.Cache - sitemppo.business.datamodel.Structure: Is element with key sitemppo.business.datamodel.Structure#37 expired?: false
41078 [main] DEBUG org.hibernate.cache.ReadWriteCache - Cached: sitemppo.business.datamodel.Structure#37
41078 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - done materializing entity [sitemppo.business.datamodel.TestStructure#37]
41078 [main] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections were found in result set for role: sitemppo.business.datamodel.TestItem.testStructures
41078 [main] DEBUG org.hibernate.engine.CollectionLoadContext - collection fully initialized: [sitemppo.business.datamodel.TestItem.testStructures#226]
41078 [main] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections initialized for role: sitemppo.business.datamodel.TestItem.testStructures
41078 [main] DEBUG org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
41078 [main] DEBUG org.hibernate.loader.Loader - done loading collection
41078 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - collection initialized
das ganze passiert in dieser methode
Code:
private void addTestItemToTestStructure(TestStructure ts, TestItem ti) {
if (Hibernate.isInitialized(ti.getTestStructures())) {
ti.getTestStructures().add(ts);
ts.getTestItems().add(ti);
this.saveOrUpdate(ti);
this.saveOrUpdate(ts);
} else {
Session s = this.getSession();
TestItem nti = (TestItem) s.get(ti.getClass(), ti.getId());
TestStructure nts = (TestStructure) s.get(ts.getClass(), ts.getId());
nti.getTestStructures().add(nts); // hier kommt die warnung
nts.getTestItems().add(nti);
s.saveOrUpdate(nti);
s.saveOrUpdate(nts);
s.flush();
}
}