-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: One-To-Many Lazy Loading Problem
PostPosted: Fri May 28, 2004 5:17 pm 
Newbie

Joined: Fri May 14, 2004 5:38 pm
Posts: 12
Hi all,

I have a strange problem getting lazy loading to work with a unidirectionaly one-to-many mapping. I think I did everything right.. I set lazy="true" on the set element, the contained class defines a proxy, etc. When I do a session.load() on the object, two queries are performed: 1 for the object itself, and one for it's associations.

Anyone have any idea why I can't get these things to lazy load?
Any help would be most appreciated!

thanks!

joe



Here are the mappings:

<!---- ObjectA --------->
<hibernate-mapping>
<class
name="com.schwab.test.ObjectA"
table="objectA"
dynamic-update="false"
dynamic-insert="false"
mutable="true"
>
<id
name="id"
column="id"
type="int"
unsaved-value="-1"
>
<generator class="native">
<param name="sequence">objecta_sequence</param>
</generator>
</id>

<set
name="bObjects"
lazy="true"
inverse="false"
cascade="all-delete-orphan"
sort="unsorted"
>
<key
column="objecta_id"
/>

<one-to-many
class="com.schwab.test.ObjectB"
/>
</set>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-ObjectA.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>




<!---- ObjectB --------->
<hibernate-mapping>
<class
name="com.schwab.test.ObjectB"
table="objectB"
proxy="com.schwab.test.ObjectB"
dynamic-update="false"
dynamic-insert="false"
mutable="true"
>

<id
name="id"
column="id"
type="int"
unsaved-value="-1"
>
<generator class="native">
<param name="sequence">objectb_sequence</param>
</generator>
</id>

<property
name="bName"
type="java.lang.String"
update="true"
insert="true"
column="bName"
not-null="false"
unique="false"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-ObjectB.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>


<!--- junit test case ----->

public class TestPersistence extends TestCase
{
private int a_id;

/**
* Create object to test on
* @throws Exception
*/
protected void setUp() throws Exception
{
Session session = HibernateUtil.currentSession();
Transaction tx = session.beginTransaction();

// Create 1 object a
ObjectA a = new ObjectA();

// Create multiple Object Bs
ObjectB b1 = new ObjectB();
b1.setbName("First");

ObjectB b2 = new ObjectB();
b2.setbName("Second");

ObjectB b3 = new ObjectB();
b3.setbName("Third");

HashSet aSet = new HashSet();
aSet.add(b1);
aSet.add(b2);
aSet.add(b3);

a.setbObjects(aSet);

session.saveOrUpdate(a);

tx.commit();
HibernateUtil.closeSession();

this.a_id = a.getId();
}

protected void tearDown() throws Exception
{
Session session = HibernateUtil.currentSession();
Transaction tx = session.beginTransaction();

ObjectA a = (ObjectA)session.load(ObjectA.class,new Integer(this.a_id));
session.delete(a);

tx.commit();
HibernateUtil.closeSession();
}


/**
* Test to see if the lazy instantiation really works.
* @throws Exception
*/
public void testLazy() throws Exception
{
Session session = HibernateUtil.currentSession();
Transaction tx = session.beginTransaction();

ObjectA a = (ObjectA)session.load(ObjectA.class, new Integer(this.a_id));


tx.commit();
HibernateUtil.closeSession();
}
}


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 28, 2004 5:20 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Unlikely, because your mapping is correct. Enable the debug log and check why Hibernate thinks it has to execute the second select.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Debug Log
PostPosted: Fri May 28, 2004 5:48 pm 
Newbie

Joined: Fri May 14, 2004 5:38 pm
Posts: 12
christian wrote:
Unlikely, because your mapping is correct. Enable the debug log and check why Hibernate thinks it has to execute the second select.


Well it's good to know I have the configuration right... but the debug logs seem to indicate that hibernate thinks my colleciton supposed to be non-lazy:


INFO - Hibernate 2.1.3
INFO - hibernate.properties not found
INFO - using CGLIB reflection optimizer
INFO - configuring from resource: /hibernate.cfg.xml
INFO - Configuration resource: /hibernate.cfg.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath
DEBUG - hibernate.connection.driver_class=org.postgresql.Driver
DEBUG - hibernate.connection.url=jdbc:postgresql://localhost/quickstart
DEBUG - hibernate.connection.username=quickstart
DEBUG - hibernate.connection.password=secret
DEBUG - show_sql=true
DEBUG - dialect=net.sf.hibernate.dialect.PostgreSQLDialect
DEBUG - transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory
DEBUG - hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider
DEBUG - null<-org.dom4j.tree.DefaultAttribute@17a4c6 [Attribute: name resource value "net/sf/hibernate/examples/quickstart/Cat.hbm.xml"]
INFO - Mapping resource: net/sf/hibernate/examples/quickstart/Cat.hbm.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
INFO - Mapping class: net.sf.hibernate.examples.quickstart.Cat -> CAT
DEBUG - Mapped property: id -> CAT_ID, type: integer
DEBUG - Mapped property: name -> name, type: string
DEBUG - Mapped property: sex -> sex, type: character
DEBUG - Mapped property: weight -> weight, type: float
DEBUG - null<-org.dom4j.tree.DefaultAttribute@bcfbeb [Attribute: name resource value "net/sf/hibernate/examples/quickstart/TransactionIF.hbm.xml"]
INFO - Mapping resource: net/sf/hibernate/examples/quickstart/TransactionIF.hbm.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
INFO - Mapping class: net.sf.hibernate.examples.quickstart.TransactionIF -> Transaction
DEBUG - Mapped property: id -> transaction_id, type: integer
INFO - Mapping joined-subclass: net.sf.hibernate.examples.quickstart.TransactionA -> TransactionA
DEBUG - Mapped property: aProperty -> aProperty, type: string
INFO - Mapping joined-subclass: net.sf.hibernate.examples.quickstart.TransactionB -> TransactionB
DEBUG - Mapped property: bProperty -> bProperty, type: string
DEBUG - null<-org.dom4j.tree.DefaultAttribute@c5a2f7 [Attribute: name resource value "net/sf/hibernate/examples/quickstart/Foo.hbm.xml"]
INFO - Mapping resource: net/sf/hibernate/examples/quickstart/Foo.hbm.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
INFO - Mapping class: net.sf.hibernate.examples.quickstart.Foo -> Foo
DEBUG - Mapped property: id -> id, type: integer
INFO - Mapping collection: net.sf.hibernate.examples.quickstart.Foo.bars -> names
DEBUG - Mapped property: bars, type: java.util.Set
DEBUG - null<-org.dom4j.tree.DefaultAttribute@a22e0c [Attribute: name resource value "com/schwab/test/ObjectA.hbm.xml"]
INFO - Mapping resource: com/schwab/test/ObjectA.hbm.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
INFO - Mapping class: com.schwab.test.ObjectA -> objectA
DEBUG - Mapped property: id -> id, type: integer
DEBUG - Mapped property: bObjects, type: java.util.Set
DEBUG - null<-org.dom4j.tree.DefaultAttribute@6f956 [Attribute: name resource value "com/schwab/test/ObjectB.hbm.xml"]
INFO - Mapping resource: com/schwab/test/ObjectB.hbm.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
INFO - Mapping class: com.schwab.test.ObjectB -> objectB
DEBUG - Mapped property: id -> id, type: integer
DEBUG - Mapped property: bName -> bName, type: string
INFO - Configured SessionFactory: null
DEBUG - properties: {hibernate.connection.password=secret, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, sun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries, java.vm.version=1.4.2-34, hibernate.connection.username=quickstart, gopherProxySet=false, java.vm.vendor="Apple Computer, Inc.", java.vendor.url=http://apple.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/jbella/Documents/work/test/hibernate, java.runtime.version=1.4.2_03-117.1, java.awt.graphicsenv=apple.awt.CGraphicsEnvironment, java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/endorsed, os.arch=ppc, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Mac OS X, sun.java2d.fontpath=, java.library.path=/Applications/Development/IntelliJ IDEA-4.0/IntelliJ IDEA.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources:.:/Users/jbella/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory, os.version=10.3.4, user.home=/Users/jbella, user.timezone=, java.awt.printerjob=apple.awt.CPrinterJob, file.encoding=MacRoman, java.specification.version=1.4, hibernate.connection.driver_class=org.postgresql.Driver, show_sql=true, user.name=jbella, java.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/jaws.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/netscape.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/ldapsec.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/sunjce_provider.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/classes:/Users/jbella/Documents/work/lib/servlet/servlet2.3/serlvet2.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ant-1.5.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ant-optional-1.5.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/c3p0-0.8.4.5.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/cglib-full-2.0.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-collections-2.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-dbcp-1.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-lang-1.0.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-logging-1.0.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-pool-1.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/concurrent-1.3.2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/connector.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/dom4j-1.4.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ehcache-0.7.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/hibernate2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jaas.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-cache.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-common.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-jmx.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-system.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jcs-1.0-dev.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jdbc2_0-stdext.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jgroups-2.2.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jta.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/junit-3.8.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/log4j-1.2.8.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/odmg-3.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/oscache-2.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/pg74.1jdbc3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/proxool-0.8.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/swarmcache-1.0rc2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xalan-2.4.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xerces-2.4.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xml-apis.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xdoclet-hibernate-module-1.2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xdoclet-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/commons-collections-2.0.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/commons-logging.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/log4j.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/maven-xdoclet-plugin-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-apache-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-bea-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-borland-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-caucho-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-de-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-ejb-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-exolab-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-fr_FR-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-hibernate-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-hp-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-ibm-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-java-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jboss-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jdo-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jmx-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-libelis-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-macromedia-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mockobjects-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mvcsoft-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mx4j-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-objectweb-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-oracle-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-orion-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-portlet-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-pramati-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-pt_BR-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-solarmetric-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-sun-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-sybase-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-tjdo-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-web-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-webwork-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-xdoclet-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xjavadoc-1.0.2.jar:/Applications/Development/IntelliJ IDEA-4.0/IntelliJ IDEA.app/lib/idea_rt.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql://localhost/quickstart, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=apple.awt.CToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_03, java.ext.dirs=/Users/jbella/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext, sun.boot.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar, java.vendor=Apple Computer, Inc., file.separator=/, java.vendor.url.bug=http://developer.apple.com/java/, sun.io.unicode.encoding=UnicodeBig, sun.cpu.endian=big, mrj.version=117.1, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, sun.cpu.isalist=}
INFO - processing one-to-many association mappings
DEBUG - Second pass for collection: net.sf.hibernate.examples.quickstart.Foo.bars
DEBUG - Mapped collection key: foo_id, element: name, type: string
DEBUG - Second pass for collection: com.schwab.test.ObjectA.bObjects
INFO - Mapping collection: com.schwab.test.ObjectA.bObjects -> objectB
DEBUG - Mapped collection key: objecta_id, one-to-many: com.schwab.test.ObjectB
INFO - processing one-to-one association property references
INFO - processing foreign key constraints
DEBUG - resolving reference to class: net.sf.hibernate.examples.quickstart.TransactionIF
DEBUG - resolving reference to class: com.schwab.test.ObjectA
DEBUG - resolving reference to class: net.sf.hibernate.examples.quickstart.Foo
DEBUG - resolving reference to class: net.sf.hibernate.examples.quickstart.TransactionIF
INFO - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
INFO - Use outer join fetching: true
INFO - Using Hibernate built-in connection pool (not for production use!)
INFO - Hibernate connection pool size: 20
INFO - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/quickstart
INFO - connection properties: {user=quickstart, password=secret}
INFO - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
INFO - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
DEBUG - total checked-out connections: 0
DEBUG - opening new JDBC connection
DEBUG - created connection to: jdbc:postgresql://localhost/quickstart, Isolation Level: 2
DEBUG - returning connection to pool, pool size: 1
INFO - Use scrollable result sets: true
INFO - Use JDBC3 getGeneratedKeys(): false
INFO - Optimize cache for minimal puts: false
INFO - echoing all SQL to stdout
INFO - Query language substitutions: {}
INFO - cache provider: net.sf.hibernate.cache.HashtableCacheProvider
INFO - instantiating and configuring caches
INFO - building session factory
DEBUG - instantiating session factory with properties: {hibernate.connection.password=secret, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, sun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries, java.vm.version=1.4.2-34, hibernate.connection.username=quickstart, gopherProxySet=false, java.vm.vendor="Apple Computer, Inc.", java.vendor.url=http://apple.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/jbella/Documents/work/test/hibernate, java.runtime.version=1.4.2_03-117.1, java.awt.graphicsenv=apple.awt.CGraphicsEnvironment, java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/endorsed, os.arch=ppc, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Mac OS X, sun.java2d.fontpath=, java.library.path=/Applications/Development/IntelliJ IDEA-4.0/IntelliJ IDEA.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources:.:/Users/jbella/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory, java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory, os.version=10.3.4, user.home=/Users/jbella, user.timezone=, java.awt.printerjob=apple.awt.CPrinterJob, file.encoding=MacRoman, java.specification.version=1.4, hibernate.connection.driver_class=org.postgresql.Driver, show_sql=true, user.name=jbella, java.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/jaws.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/netscape.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/ldapsec.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/sunjce_provider.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/classes:/Users/jbella/Documents/work/lib/servlet/servlet2.3/serlvet2.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ant-1.5.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ant-optional-1.5.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/c3p0-0.8.4.5.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/cglib-full-2.0.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-collections-2.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-dbcp-1.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-lang-1.0.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-logging-1.0.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/commons-pool-1.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/concurrent-1.3.2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/connector.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/dom4j-1.4.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/ehcache-0.7.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/hibernate2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jaas.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-cache.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-common.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-jmx.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jboss-system.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jcs-1.0-dev.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jdbc2_0-stdext.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jgroups-2.2.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/jta.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/junit-3.8.1.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/log4j-1.2.8.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/odmg-3.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/oscache-2.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/pg74.1jdbc3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/proxool-0.8.3.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/swarmcache-1.0rc2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xalan-2.4.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xerces-2.4.0.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xml-apis.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xdoclet-hibernate-module-1.2.jar:/Users/jbella/Documents/work/test/hibernate/webapps/quickstart/WEB-INF/lib/xdoclet-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/commons-collections-2.0.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/commons-logging.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/log4j.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/maven-xdoclet-plugin-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-apache-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-bea-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-borland-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-caucho-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-de-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-ejb-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-exolab-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-fr_FR-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-hibernate-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-hp-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-ibm-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-java-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jboss-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jdo-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-jmx-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-libelis-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-macromedia-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mockobjects-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mvcsoft-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-mx4j-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-objectweb-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-oracle-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-orion-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-portlet-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-pramati-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-pt_BR-locale-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-solarmetric-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-sun-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-sybase-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-tjdo-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-web-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-webwork-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xdoclet-xdoclet-module-1.2.jar:/Users/jbella/Documents/work/lib/xdoclet-1.2/lib/xjavadoc-1.0.2.jar:/Applications/Development/IntelliJ IDEA-4.0/IntelliJ IDEA.app/lib/idea_rt.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql://localhost/quickstart, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=apple.awt.CToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_03, java.ext.dirs=/Users/jbella/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext, sun.boot.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar, java.vendor=Apple Computer, Inc., file.separator=/, java.vendor.url.bug=http://developer.apple.com/java/, sun.io.unicode.encoding=UnicodeBig, sun.cpu.endian=big, mrj.version=117.1, dialect=net.sf.hibernate.dialect.PostgreSQLDialect, sun.cpu.isalist=}
DEBUG - initializing class SessionFactoryObjectFactory
DEBUG - registered: 8a84bc91fccd8b4600fccd8b5bc70000 (unnamed)
INFO - no JNDI name configured
DEBUG - instantiated session factory
DEBUG - opened session
DEBUG - begin
DEBUG - total checked-out connections: 0
DEBUG - using pooled JDBC connection, pool size: 0
DEBUG - current autocommit status:false
DEBUG - id unsaved-value: -1
DEBUG - saveOrUpdate() unsaved instance
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select nextval ('objecta_sequence')
Hibernate: select nextval ('objecta_sequence')
DEBUG - preparing statement
DEBUG - Sequence identifier generated: 17
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - generated identifier: 17
DEBUG - saving [com.schwab.test.ObjectA#17]
DEBUG - processing cascades for: com.schwab.test.ObjectA
DEBUG - done processing cascades for: com.schwab.test.ObjectA
DEBUG - Wrapped collection in role: com.schwab.test.ObjectA.bObjects
DEBUG - processing cascades for: com.schwab.test.ObjectA
DEBUG - cascading to collection: com.schwab.test.ObjectA.bObjects
DEBUG - cascading to saveOrUpdate()
DEBUG - id unsaved-value: -1
DEBUG - saveOrUpdate() unsaved instance
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select nextval ('objectb_sequence')
Hibernate: select nextval ('objectb_sequence')
DEBUG - preparing statement
DEBUG - Sequence identifier generated: 46
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - generated identifier: 46
DEBUG - saving [com.schwab.test.ObjectB#46]
DEBUG - cascading to saveOrUpdate()
DEBUG - id unsaved-value: -1
DEBUG - saveOrUpdate() unsaved instance
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select nextval ('objectb_sequence')
Hibernate: select nextval ('objectb_sequence')
DEBUG - preparing statement
DEBUG - Sequence identifier generated: 47
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - generated identifier: 47
DEBUG - saving [com.schwab.test.ObjectB#47]
DEBUG - cascading to saveOrUpdate()
DEBUG - id unsaved-value: -1
DEBUG - saveOrUpdate() unsaved instance
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select nextval ('objectb_sequence')
Hibernate: select nextval ('objectb_sequence')
DEBUG - preparing statement
DEBUG - Sequence identifier generated: 48
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - generated identifier: 48
DEBUG - saving [com.schwab.test.ObjectB#48]
DEBUG - done processing cascades for: com.schwab.test.ObjectA
DEBUG - commit
DEBUG - flushing session
DEBUG - processing cascades for: com.schwab.test.ObjectA
DEBUG - cascading to collection: com.schwab.test.ObjectA.bObjects
DEBUG - cascading to saveOrUpdate()
DEBUG - saveOrUpdate() persistent instance
DEBUG - cascading to saveOrUpdate()
DEBUG - saveOrUpdate() persistent instance
DEBUG - cascading to saveOrUpdate()
DEBUG - saveOrUpdate() persistent instance
DEBUG - done processing cascades for: com.schwab.test.ObjectA
DEBUG - Flushing entities and processing referenced collections
DEBUG - Collection found: [com.schwab.test.ObjectA.bObjects#17], was: [<unreferenced>]
DEBUG - Processing unreferenced collections
DEBUG - Scheduling collection removes/(re)creates/updates
DEBUG - Flushed: 4 insertions, 0 updates, 0 deletions to 4 objects
DEBUG - Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
DEBUG - listing entities:
DEBUG - com.schwab.test.ObjectB{bName=First, id=48}
DEBUG - com.schwab.test.ObjectB{bName=Second, id=47}
DEBUG - com.schwab.test.ObjectB{bName=Third, id=46}
DEBUG - com.schwab.test.ObjectA{bObjects=[ObjectB#46, ObjectB#47, ObjectB#48], id=17}
DEBUG - executing flush
DEBUG - Inserting entity: [com.schwab.test.ObjectA#17]
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - insert into objectA (id) values (?)
Hibernate: insert into objectA (id) values (?)
DEBUG - preparing statement
DEBUG - Dehydrating entity: [com.schwab.test.ObjectA#17]
DEBUG - binding '17' to parameter: 1
DEBUG - Adding to batch
DEBUG - Inserting entity: [com.schwab.test.ObjectB#46]
DEBUG - Executing batch size: 1
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - insert into objectB (bName, id) values (?, ?)
Hibernate: insert into objectB (bName, id) values (?, ?)
DEBUG - preparing statement
DEBUG - Dehydrating entity: [com.schwab.test.ObjectB#46]
DEBUG - binding 'Third' to parameter: 1
DEBUG - binding '46' to parameter: 2
DEBUG - Adding to batch
DEBUG - Inserting entity: [com.schwab.test.ObjectB#47]
DEBUG - Dehydrating entity: [com.schwab.test.ObjectB#47]
DEBUG - binding 'Second' to parameter: 1
DEBUG - binding '47' to parameter: 2
DEBUG - Adding to batch
DEBUG - Inserting entity: [com.schwab.test.ObjectB#48]
DEBUG - Dehydrating entity: [com.schwab.test.ObjectB#48]
DEBUG - binding 'First' to parameter: 1
DEBUG - binding '48' to parameter: 2
DEBUG - Adding to batch
DEBUG - Executing batch size: 3
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - Inserting collection: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - update objectB set objecta_id=? where id=?
Hibernate: update objectB set objecta_id=? where id=?
DEBUG - preparing statement
DEBUG - binding '17' to parameter: 1
DEBUG - binding '46' to parameter: 2
DEBUG - Adding to batch
DEBUG - binding '17' to parameter: 1
DEBUG - binding '47' to parameter: 2
DEBUG - Adding to batch
DEBUG - binding '17' to parameter: 1
DEBUG - binding '48' to parameter: 2
DEBUG - Adding to batch
DEBUG - done inserting collection: 3 rows inserted
DEBUG - Executing batch size: 3
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - post flush
DEBUG - transaction completion
DEBUG - closing session
DEBUG - disconnecting session
DEBUG - returning connection to pool, pool size: 1
DEBUG - transaction completion
DEBUG - opened session
DEBUG - begin
DEBUG - total checked-out connections: 0
DEBUG - using pooled JDBC connection, pool size: 0
DEBUG - current autocommit status:false
DEBUG - loading [com.schwab.test.ObjectA#17]
DEBUG - attempting to resolve [com.schwab.test.ObjectA#17]
DEBUG - object not resolved in any cache [com.schwab.test.ObjectA#17]
DEBUG - Materializing entity: [com.schwab.test.ObjectA#17]
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select objecta0_.id as id0_ from objectA objecta0_ where objecta0_.id=?
Hibernate: select objecta0_.id as id0_ from objectA objecta0_ where objecta0_.id=?
DEBUG - preparing statement
DEBUG - binding '17' to parameter: 1
DEBUG - processing result set
DEBUG - result row: 17
DEBUG - Initializing object from ResultSet: 17
DEBUG - Hydrating entity: com.schwab.test.ObjectA#17
DEBUG - done processing result set (1 rows)
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - total objects hydrated: 1
DEBUG - resolving associations for [com.schwab.test.ObjectA#17]
DEBUG - creating collection wrapper:[com.schwab.test.ObjectA.bObjects#17]
DEBUG - done materializing entity [com.schwab.test.ObjectA#17]

---> Seems to think the collection is non-lazy
DEBUG - initializing non-lazy collections


DEBUG - initializing collection [com.schwab.test.ObjectA.bObjects#17]
DEBUG - checking second-level cache
DEBUG - collection not cached
DEBUG - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - select bobjects0_.id as id__, bobjects0_.objecta_id as objecta_id__, bobjects0_.id as id0_, bobjects0_.bName as bName0_ from objectB bobjects0_ where bobjects0_.objecta_id=?
Hibernate: select bobjects0_.id as id__, bobjects0_.objecta_id as objecta_id__, bobjects0_.id as id0_, bobjects0_.bName as bName0_ from objectB bobjects0_ where bobjects0_.objecta_id=?
DEBUG - preparing statement
DEBUG - binding '17' to parameter: 1
DEBUG - result set contains (possibly empty) collection: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - uninitialized collection: initializing
DEBUG - processing result set
DEBUG - returning '46' as column: id0_
DEBUG - result row: 46
DEBUG - Initializing object from ResultSet: 46
DEBUG - Hydrating entity: com.schwab.test.ObjectB#46
DEBUG - returning 'Third' as column: bName0_
DEBUG - returning '17' as column: objecta_id__
DEBUG - running Session.finalize()
DEBUG - found row of collection: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - reading row
DEBUG - returning '46' as column: id__
DEBUG - loading [com.schwab.test.ObjectB#46]
DEBUG - attempting to resolve [com.schwab.test.ObjectB#46]
DEBUG - resolved object in session cache [com.schwab.test.ObjectB#46]
DEBUG - returning '47' as column: id0_
DEBUG - result row: 47
DEBUG - Initializing object from ResultSet: 47
DEBUG - Hydrating entity: com.schwab.test.ObjectB#47
DEBUG - returning 'Second' as column: bName0_
DEBUG - returning '17' as column: objecta_id__
DEBUG - found row of collection: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - reading row
DEBUG - returning '47' as column: id__
DEBUG - loading [com.schwab.test.ObjectB#47]
DEBUG - attempting to resolve [com.schwab.test.ObjectB#47]
DEBUG - resolved object in session cache [com.schwab.test.ObjectB#47]
DEBUG - returning '48' as column: id0_
DEBUG - result row: 48
DEBUG - Initializing object from ResultSet: 48
DEBUG - Hydrating entity: com.schwab.test.ObjectB#48
DEBUG - returning 'First' as column: bName0_
DEBUG - returning '17' as column: objecta_id__
DEBUG - found row of collection: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - reading row
DEBUG - returning '48' as column: id__
DEBUG - loading [com.schwab.test.ObjectB#48]
DEBUG - attempting to resolve [com.schwab.test.ObjectB#48]
DEBUG - resolved object in session cache [com.schwab.test.ObjectB#48]
DEBUG - done processing result set (3 rows)
DEBUG - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - closing statement
DEBUG - total objects hydrated: 3
DEBUG - resolving associations for [com.schwab.test.ObjectB#46]
DEBUG - done materializing entity [com.schwab.test.ObjectB#46]
DEBUG - resolving associations for [com.schwab.test.ObjectB#47]
DEBUG - done materializing entity [com.schwab.test.ObjectB#47]
DEBUG - resolving associations for [com.schwab.test.ObjectB#48]
DEBUG - done materializing entity [com.schwab.test.ObjectB#48]
DEBUG - 1 collections were found in result set
DEBUG - collection fully initialized: [com.schwab.test.ObjectA.bObjects#17]
DEBUG - 1 collections initialized
DEBUG - initializing non-lazy collections
DEBUG - collection initialized


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 28, 2004 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I'm pretty sure that this works as expected and that the problem is somewhere in your setup, but I don't have any idea where to look.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 28, 2004 6:44 pm 
Newbie

Joined: Fri May 14, 2004 5:38 pm
Posts: 12
christian wrote:
I'm pretty sure that this works as expected and that the problem is somewhere in your setup, but I don't have any idea where to look.


hmm...

you may be right... It seems to work fine if I dont run it in the debugger... weird..

thanks!

joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.