Here is the results after turning debug on:
15:48:58,782 DEBUG BatcherImpl:226 - prepared statement get: select child0_.id as id__, parent1_.id as id0_, parent1_.refId as refId0_, child0_.id as id1_, child0_.parent_id as parent_id1_, child0_.name as name1_ from Child child0_, Parent parent1_ where child0_.id=? and child0_.parent_id=parent1_.id(+)
Hibernate: select child0_.id as id__, parent1_.id as id0_, parent1_.refId as refId0_, child0_.id as id1_, child0_.parent_id as parent_id1_, child0_.name as name1_ from Child child0_, Parent parent1_ where child0_.id=? and child0_.parent_id=parent1_.id(+)
15:48:58,782 DEBUG BatcherImpl:232 - preparing statement
15:48:58,792 DEBUG Loader:263 - result set contains (possibly empty) collection: [com.pts.ietms.data.om.Parent.children#393217]
15:48:58,792 DEBUG SessionImpl:3039 - uninitialized collection: initializing
15:48:58,802 DEBUG Loader:174 - processing result set
15:48:58,802 DEBUG Loader:202 - done processing result set (0 rows)
As you can see the sql generated takes a child id as a parameter. I would have thought it should take a parent id as a parameter (ie this is reveresed) the resulting sql returns nothing ... I can't be sure what is being passed to the prepared statement but if you assume its the parent id then of course it would return no results...
Below is the entire detail I tried to bold the relevant sections. The first bold shows three inserts occuring as expected one for the parent, and one for each child (there are two). The retrieval is the interesting part it shows the sql creation of the parent, and the fact that it gets no rows returned for the children collection:
For Reference here is the metadata that was run with this:
Code:
<class name="com.pts.ietms.data.om.Parent" table="Parent">
<id name="id" type="big_decimal" unsaved-value="null">
<column name="id" sql-type="NUMBER(38)"/>
<generator class="com.pts.ietms.data.tools.HKeyGenerator"/>
</id>
<property name="refId" type="string" />
<set name="children" table="children" inverse="true" cascade="all-delete-orphan">
<key >
<column name="id" sql-type="NUMBER(38)" />
</key>
<one-to-many class="com.pts.ietms.data.om.Child" />
</set>
</class>
<class name="com.pts.ietms.data.om.Child" table="Child">
<id name="id" type="big_decimal" unsaved-value="null">
<column name="id" sql-type="NUMBER(38)"/>
<generator class="com.pts.ietms.data.tools.HKeyGenerator"/>
</id>
<many-to-one name="parent" class="com.pts.ietms.data.om.Parent">
<column name="parent_id" sql-type="NUMBER(38)" not-null="true" />
</many-to-one>
<property name="name" type="string" />
</class>
Changed Test Code to include verification step which lead to changing child hash code and equals to include child name as a parameter .. so now child code equals and hash code are:
Code:
public boolean equals(Object other) {
if ( !(other instanceof Child) ) return false;
Child castOther = (Child) other;
return new EqualsBuilder()
.append(this.getId(), castOther.getId())
.append(this.getName(), castOther.getName())
.isEquals();
}
public int hashCode()
{
return new HashCodeBuilder()
.append(getId())
.append(getName())
.toHashCode();
}
}
Added verification step in test program to print parent before saving...
Code:
Child c = new Child("Child1");
p.addChild(c);
c = new Child("Child2");
p.addChild(c);
System.out.println(">>> Verify parent <<< ");
System.out.println("Parent" + p.getRefId());
System.out.println("With " + p.getChildren().size() + " children");
Iterator it = p.getChildren().iterator();
while (it.hasNext())
{
System.out.println("Child:" + ((Child)(it.next())).getName());
}
System.out.println("Saving parent");
Log File:
15:48:49,358 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.OracleDialect
15:48:49,358 INFO SettingsFactory:62 - Use outer join fetching: true
15:48:49,388 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
15:48:49,388 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 10
15:48:49,518 INFO DriverManagerConnectionProvider:71 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:oci8:@MRIDB
15:48:49,528 INFO DriverManagerConnectionProvider:72 - connection properties: {user=apptest, password=apptest, statement_cache=25, driver=oracle.jdbc.driver.OracleDriver}
15:48:49,538 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (use of process level read-write cache is not recommended)
15:48:49,538 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
15:48:49,538 DEBUG DriverManagerConnectionProvider:94 - opening new JDBC connection
15:48:55,327 DEBUG DriverManagerConnectionProvider:107 - created connection to: jdbc:oracle:oci8:@MRIDB, Isolation Level: 2
15:48:55,347 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1
15:48:55,347 INFO SettingsFactory:89 - Use scrollable result sets: true
15:48:55,347 INFO SettingsFactory:96 - echoing all SQL to stdout
15:48:55,347 INFO SettingsFactory:99 - Query language substitutions: {no=N, true=1, yes=Y, false=0}
15:48:55,347 INFO SettingsFactory:110 - cache provider: net.sf.hibernate.cache.JCSCacheProvider
15:48:55,377 INFO Configuration:930 - instantiating and configuring caches
15:48:55,507 INFO SessionFactoryImpl:112 - building session factory
15:48:55,507 DEBUG SessionFactoryImpl:118 - instantiating session factory with properties: {java.vendor=Sun Microsystems Inc., show_sql=true, hibernate.connection.url=jdbc:oracle:oci8:@MRIDB, os.name=Windows 2000, sun.boot.class.path=c:\java\j2sdk1.4.2\jre\lib\rt.jar;c:\java\j2sdk1.4.2\jre\lib\i18n.jar;c:\java\j2sdk1.4.2\jre\lib\sunrsasign.jar;c:\java\j2sdk1.4.2\jre\lib\jsse.jar;c:\java\j2sdk1.4.2\jre\lib\jce.jar;c:\java\j2sdk1.4.2\jre\lib\charsets.jar;c:\java\j2sdk1.4.2\jre\classes, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.4.2-b28, user.name=Administrator, hibernate.query.imports= com.pts.ietms.data.om, user.language=en, sun.boot.library.path=c:\java\j2sdk1.4.2\jre\bin, dialect=net.sf.hibernate.dialect.OracleDialect, java.version=1.4.2, user.timezone=America/New_York, sun.arch.data.model=32, hibernate.use_outer_join=true, java.endorsed.dirs=c:\java\j2sdk1.4.2\jre\lib\endorsed, sun.cpu.isalist=pentium i486 i386, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=48.0, user.country=US, java.home=c:\java\j2sdk1.4.2\jre, java.vm.info=mixed mode, os.version=5.0, path.separator=;, java.vm.version=1.4.2-b28, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, hibernate.connection.password=apptest, user.variant=, hibernate.jdbc.batch_size=0, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.statement_cache=25, hibernate.connection.username=apptest, user.home=C:\Documents and Settings\Administrator, hibernate.query.substitutions=true 1, false 0, yes Y, no N, hibernate.proxool.pool_alais=pool1, java.specification.vendor=Sun Microsystems Inc., hibernate.statement_cache.size=25, hibernate.connection.driver=oracle.jdbc.driver.OracleDriver, java.library.path=c:\java\j2sdk1.4.2\bin;.;C:\WINNT\system32;C:\WINNT;c:\vslickplugin\eclipse\plugins\com.slickedit.eclipse.plugin_8.0.1\win;c:\java\j2sdk1.4.2\bin;c:\vslick\win;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\MSSQL7\BINN;c:\mysql\lib\opt;c:\mysql\bin;c:\projects\bin;c:\vslick\win;C:\java\jwsdp-1.2\jwsdp-shared\bin, java.vendor.url=http://java.sun.com/, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.proxool.pool_alias=pool1, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=net.sf.hibernate.dialect.OracleDialect, hibernate.connection.user=apptest, hibernate.jdbc.use_streams_for_binary=true, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=C:\projects\peridyneRepository\ietms-hibernate\build\classes;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\proxool.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-lang.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\jdom.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\optional.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-collections.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\connector.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-dbcp.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\jcs.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-logging.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-pool.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\hibernate-tools.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-beanutils.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\xerces.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\javassist.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\xml-apis.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\cglib-asm.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\dom4j.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\jaas.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\jta.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\xalan.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\c3p0.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\junit.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\odmg.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\classes12.zip;C:\java\hibernate-2.1\hibernate2.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\hibernate2.jar;C:\projects\peridyneRepository\interact-etms\build\classes;C:\java\j2sdk1.4.2\lib\tools.jar;C:\projects\peridyneRepository\ietms-hibernate\build\deploy\ietms-domainModel.jar;C:\java\j2sdk1.4.2\src.zip;C:\java\jboss-3.0.6_tomcat-4.1.18\server\interact-test\lib\jboss-j2ee.jar;C:\java\jboss-3.0.6_tomcat-4.1.18\server\interact-test\lib\hibernate2.jar;C:\projects\peridyneRepository\interact-etms\lib\interact\common\interact-core-common.jar;C:\projects\peridyneRepository\interact-etms\lib\interact\server\interact-core-ejbclient.jar;C:\java\jboss-3.0.6_tomcat-4.1.18\server\interact-test\lib\struts.jar;C:\java\jboss-3.0.6_tomcat-4.1.18\tomcat-4.1.x\common\lib\servlet.jar;C:\java\jboss-3.0.6_tomcat-4.1.18\server\interact-test\lib\log4j.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-lang.jar;C:\projects\peridyneRepository\ietms-hibernate\lib\h-2.1\commons-beanutils.jar;C:\projects\peridyneRepository\interact-etms\build\deploy\interact-etms-ui.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\batik-awt-util.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\batik-dom.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\batik-svggen.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\batik-util.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\batik-xml.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\caltag.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\cewolf.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-dbcp.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-fileupload.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-pool.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-resources.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\commons-validator.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\jakarta-oro.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\jcommon-0.8.6.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\jfreechart-0.9.11.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\jfreechart-0.9.11-demo.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\struts.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\tabtag.jar;C:\projects\peridyneRepository\interact-etms\lib\3rdParty\client\treetag.jar, use_outer_join=true, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=Service Pack 3, java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=c:\java\j2sdk1.4.2\jre\lib\ext, user.dir=C:\projects\peridyneRepository\ietms-hibernate\bin, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, file.encoding=Cp1252, java.specification.version=1.4, hibernate.show_sql=true, hibernate.connection.pool_size=10}
15:48:56,859 INFO ReflectHelper:132 - reflection optimizer disabled for: com.pts.ietms.data.om.Parent, NullPointerException: null
15:48:57,800 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
15:48:57,860 DEBUG SessionFactoryObjectFactory:76 - registered: 402881e1f86a7e0e00f86a7e17480000 (unnamed)
15:48:57,860 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
15:48:57,860 DEBUG SessionFactoryImpl:175 - instantiated session factory
15:48:57,980 DEBUG SessionImpl:476 - opened session
>>> Verify parent <<<
ParentParent1
With 2 children
Child:Child2
Child:Child1Saving parent
15:48:58,001 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
15:48:58,001 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0
15:48:58,241 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1
15:48:58,251 DEBUG SessionImpl:732 - saving [com.pts.ietms.data.om.Parent#393217]
15:48:58,261 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,261 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,271 DEBUG SessionImpl:2773 - Wrapped collection in role: com.pts.ietms.data.om.Parent.children
15:48:58,291 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,291 DEBUG Cascades:381 - cascading to collection: com.pts.ietms.data.om.Parent.children
15:48:58,301 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,301 DEBUG Cascades:274 - unsaved-value strategy NULL
15:48:58,301 DEBUG SessionImpl:1278 - saveOrUpdate() unsaved instance
15:48:58,301 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
15:48:58,301 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0
15:48:58,311 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1
15:48:58,321 DEBUG SessionImpl:732 - saving [com.pts.ietms.data.om.Child#425985]
15:48:58,321 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,321 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,331 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,331 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,331 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,331 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,331 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,331 DEBUG Cascades:274 - unsaved-value strategy NULL
15:48:58,341 DEBUG SessionImpl:1278 - saveOrUpdate() unsaved instance
15:48:58,341 DEBUG SessionImpl:732 - saving [com.pts.ietms.data.om.Child#425986]
15:48:58,341 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,341 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,341 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,351 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,361 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,361 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,361 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,361 DEBUG SessionImpl:2217 - flushing session
15:48:58,371 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,371 DEBUG Cascades:381 - cascading to collection: com.pts.ietms.data.om.Parent.children
15:48:58,371 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,371 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,371 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,371 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,371 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Parent
15:48:58,381 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,381 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,381 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,381 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,391 DEBUG Cascades:356 - processing cascades for: com.pts.ietms.data.om.Child
15:48:58,391 DEBUG Cascades:105 - cascading to saveOrUpdate()
15:48:58,391 DEBUG SessionImpl:1264 - saveOrUpdate() persistent instance
15:48:58,391 DEBUG Cascades:364 - done processing cascades for: com.pts.ietms.data.om.Child
15:48:58,391 DEBUG SessionImpl:2326 - Flushing entities and processing referenced collections
15:48:58,401 DEBUG SessionImpl:2773 - Wrapped collection in role: com.pts.ietms.data.om.Parent.children
15:48:58,401 DEBUG SessionImpl:2803 - Collection found: [com.pts.ietms.data.om.Parent.children#393217], was: [<unreferenced>]
15:48:58,401 DEBUG SessionImpl:2645 - Processing unreferenced collections
15:48:58,401 DEBUG SessionImpl:2656 - Scheduling collection removes/(re)creates/updates
15:48:58,411 DEBUG SessionImpl:2229 - Flushed: 3 insertions, 0 updates, 0 deletions to 3 objects
15:48:58,411 DEBUG SessionImpl:2234 - Flushed: 1 (re)creations, 0 updates, 0 removals to 2 collections
15:48:58,411 DEBUG SessionImpl:2264 - executing flush
15:48:58,411 DEBUG EntityPersister:503 - Inserting entity: [com.pts.ietms.data.om.Parent#393217]
15:48:58,421 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:48:58,421 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
15:48:58,421 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0
15:48:58,421 DEBUG BatcherImpl:226 - prepared statement get: insert into Parent (refId, id) values (?, ?)
Hibernate: insert into Parent (refId, id) values (?, ?)
15:48:58,431 DEBUG BatcherImpl:232 - preparing statement
15:48:58,431 DEBUG EntityPersister:393 - Dehydrating entity: [com.pts.ietms.data.om.Parent#393217]
15:48:58,431 DEBUG EntityPersister:503 - Inserting entity: [com.pts.ietms.data.om.Child#425985]
15:48:58,431 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:48:58,441 DEBUG BatcherImpl:245 - closing statement
15:48:58,441 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:48:58,441 DEBUG BatcherImpl:226 - prepared statement get: insert into Child (parent_id, name, id) values (?, ?, ?)
Hibernate: insert into Child (parent_id, name, id) values (?, ?, ?)
15:48:58,451 DEBUG BatcherImpl:232 - preparing statement
15:48:58,451 DEBUG EntityPersister:393 - Dehydrating entity: [com.pts.ietms.data.om.Child#425985]
15:48:58,461 DEBUG EntityPersister:503 - Inserting entity: [com.pts.ietms.data.om.Child#425986]
15:48:58,461 DEBUG EntityPersister:393 - Dehydrating entity: [com.pts.ietms.data.om.Child#425986]
15:48:58,471 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:48:58,471 DEBUG BatcherImpl:245 - closing statement
15:48:58,471 DEBUG SessionImpl:2676 - post flush
15:48:58,541 DEBUG SessionImpl:494 - closing session
15:48:58,541 DEBUG SessionImpl:3269 - disconnecting session
15:48:58,541 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1
15:48:58,541 DEBUG SessionImpl:506 - transaction completion
Retrieving Parent
15:48:58,541 DEBUG SessionImpl:476 - opened session
15:48:58,611 DEBUG SessionImpl:1420 - find: from com.pts.ietms.data.om.Parent p where p.refId = ?
15:48:58,611 DEBUG QueryParameters:82 - parameters: Parent1
15:48:58,611 DEBUG QueryParameters:83 - named parameters: {}
15:48:58,641 DEBUG QueryTranslator:148 - compiling query
15:48:58,702 DEBUG SessionImpl:2217 - flushing session
15:48:58,702 DEBUG SessionImpl:2326 - Flushing entities and processing referenced collections
15:48:58,702 DEBUG SessionImpl:2645 - Processing unreferenced collections
15:48:58,702 DEBUG SessionImpl:2656 - Scheduling collection removes/(re)creates/updates
15:48:58,712 DEBUG SessionImpl:2229 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
15:48:58,712 DEBUG SessionImpl:2234 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
15:48:58,712 DEBUG SessionImpl:1776 - Dont need to execute flush
15:48:58,712 DEBUG QueryTranslator:200 - HQL: from com.pts.ietms.data.om.Parent p where p.refId = ?
15:48:58,712 DEBUG QueryTranslator:201 - SQL: select parent0_.id as id, parent0_.refId as refId from Parent parent0_ where (parent0_.refId=? )
15:48:58,712 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:48:58,722 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
15:48:58,722 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0
15:48:58,722 DEBUG BatcherImpl:226 - prepared statement get: select parent0_.id as id, parent0_.refId as refId from Parent parent0_ where (parent0_.refId=? )
Hibernate: select parent0_.id as id, parent0_.refId as refId from Parent parent0_ where (parent0_.refId=? )
15:48:58,722 DEBUG BatcherImpl:232 - preparing statement
15:48:58,742 DEBUG Loader:174 - processing result set
15:48:58,752 DEBUG Loader:330 - result row: 393217
15:48:58,752 DEBUG Loader:427 - Initializing object from ResultSet: 393217
15:48:58,752 DEBUG Loader:482 - Hydrating entity: com.pts.ietms.data.om.Parent#393217
15:48:58,752 DEBUG Loader:202 - done processing result set (1 rows)
15:48:58,752 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:48:58,762 DEBUG BatcherImpl:245 - closing statement
15:48:58,762 DEBUG Loader:215 - total objects hydrated: 1
15:48:58,762 DEBUG SessionImpl:2158 - resolving associations for [com.pts.ietms.data.om.Parent#393217]
15:48:58,772 DEBUG SessionImpl:2180 - done materializing entity [com.pts.ietms.data.om.Parent#393217]
15:48:58,772 DEBUG SessionImpl:3117 - initializing non-lazy collection: [com.pts.ietms.data.om.Parent.children#393217]
15:48:58,772 DEBUG SessionImpl:3207 - initializing collection [com.pts.ietms.data.om.Parent.children#393217]
15:48:58,782 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:48:58,782 DEBUG BatcherImpl:226 - prepared statement get: select child0_.id as id__, parent1_.id as id0_, parent1_.refId as refId0_, child0_.id as id1_, child0_.parent_id as parent_id1_, child0_.name as name1_ from Child child0_, Parent parent1_ where child0_.id=? and child0_.parent_id=parent1_.id(+)
Hibernate: select child0_.id as id__, parent1_.id as id0_, parent1_.refId as refId0_, child0_.id as id1_, child0_.parent_id as parent_id1_, child0_.name as name1_ from Child child0_, Parent parent1_ where
child0_.id=? and child0_.parent_id=parent1_.id(+)
15:48:58,782 DEBUG BatcherImpl:232 - preparing statement
15:48:58,792 DEBUG Loader:263 - result set contains (possibly empty) collection: [com.pts.ietms.data.om.Parent.children#393217]
15:48:58,792 DEBUG SessionImpl:3039 - uninitialized collection: initializing
15:48:58,802 DEBUG Loader:174 - processing result set
15:48:58,802 DEBUG Loader:202 - done processing result set (0 rows)
15:48:58,802 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:48:58,812 DEBUG BatcherImpl:245 - closing statement
15:48:58,822 DEBUG Loader:215 - total objects hydrated: 0
15:48:58,822 DEBUG SessionImpl:3084 - collection fully initialized: [com.pts.ietms.data.om.Parent.children#393217]
15:48:58,822 DEBUG SessionImpl:3087 - 1 collections initialized
Got Parent:Parent1
With 0 children
15:48:58,822 DEBUG SessionImpl:494 - closing session
15:48:58,822 DEBUG SessionImpl:3269 - disconnecting session
15:48:58,832 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1
15:48:58,832 DEBUG SessionImpl:506 - transaction completion