Hi,
I am having a big problem concerning the link between Hibernate and a DB2-AS400 database. I cannot reach a set of "children" below a "parent". The children collection is Empty, I should have a non-empty collection.
I have a Account table having many "trades" (one-to-many relationship). The primary key of the trade is a "Char 18". I read somewhere in the forum that somebody had a similar problem with String Primary Key on Db2 As400.
I should find 4 children of trades below a specific Account Parent. The problem is not in the xml mapping, because I have build a identical datamodel on a MySql (Intel-PC) database and I can read the 4 Trades Collection on MySql! If I try to get a single instance of Trade (or a single instance of Account) it works well. I can read the data.
If I put Hibernate on the Debugger, I see that the Collection of Trade is created and filled with the correct number of Trade Object, the Trade is containing the correct data, and the Account Object is even reachable from the Trade Object. But somewhere at the end of the Collection Building process, the Collection seems to be re-initialised (or lost) and an empty Collection is added as the Trades collection under the Account Object. This is very strange!
I am using Hibernate 3.0Beta, but I am getting the same error with Hibernate 2.1.7c. I have also test it with JDK 1.4 and JDK 1.3.1 and I got the same problem.
This bug is starting to be anoying. Does anyone have an Idea to correct this bug?
Thanks all.
Etienne
Montreal
Mapping documents:
Code:
<property name="connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
<property name="connection.url">jdbc:as400:123.123.123.123/QWERTY</property>
<property name="connection.username">xxx</property>
<property name="connection.password">xxx</property>
<property name="dialect">org.hibernate.dialect.DB2400Dialect</property>
<property name="show_sql">true</property>
<property name="generate_statistics">true</property>
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
package="com"
default-access="field">
<class name="Account" table="atfa0100">
<id name="aimsAccountProductNo" column="acgicd">
<generator class="assigned"></generator>
</id>
<property name="aimsAccountProduct" column="acj8cd"/>
<property name="aimsProductCode" column="acabcd"/>
<set name="trades"
cascade="all">
<key column="trpgcd"/>
<one-to-many class="Trade"/>
</set>
</class>
<class name="Trade"
table="atft2100">
<id name="uniqueId" column="trafnb">
<generator class="assigned"></generator>
</id>
<property name="transactionDate" column="tregdc"/>
<property name="effectiveDate" column="trehdc"/>
<property name="aimsSecurityNo" column="trpmcd"/>
<property name="quantity" column="trahqy"/>
<property name="amount" column="traiam"/>
<property name="currencyOfAmount" column="trpncd"/>
<property name="aimsBSCode" column="trg9cd"/>
<property name="cancelCode" column="trc1st"/>
<many-to-one name="account"
column="trpgcd"
class="Account"
not-null="true"/>
</class>
</hibernate-mapping>
Hibernate version: I tested it with Hibernate 3.0B JDK 1.4 : does not Work
Hibernate 3.0B JDK 1.3.1 : same problem
Hibernate 2.1.7c JDK 1.4 : same problem
Code between sessionFactory.openSession() and session.close():Code:
public void testAstradeAccountAndTrades(){
SessionFactory sf = new Configuration().configure("db2.cfg.xml").buildSessionFactory();
Session session = sf.openSession();
Transaction tx = session.beginTransaction();
Account account = (Account)session.load(Account.class, "0123ABC");
assertNotNull(account);
Set trades = account.getTrades();
assertTrue(trades.size()!=0);
tx.commit();
session.close();
}
Name and version of the database you are using:DB2 on a AS400 V5R2
The generated SQL (show_sql=true):The SQL is correctly generated. See Debug Code below.
Debug level Hibernate log excerpt:Code:
11:19:58,748 INFO Environment:443).null(Unknown Source - Hibernate 3.0 beta 1
11:19:58,764 INFO Environment:456).null(Unknown Source - hibernate.properties not found
11:19:58,764 INFO Environment:489).null(Unknown Source - using CGLIB reflection optimizer
11:19:58,795 INFO Environment:519).null(Unknown Source - using JDK 1.4 java.sql.Timestamp handling
11:19:58,889 INFO Configuration:1095 - configuring from resource: db2.cfg.xml
11:19:58,889 INFO Configuration:1066 - Configuration resource: db2.cfg.xml
11:19:59,045 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
11:19:59,045 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
11:19:59,123 DEBUG Configuration:1052 - connection.driver_class=com.ibm.as400.access.AS400JDBCDriver
11:19:59,123 DEBUG Configuration:1052 - connection.url=jdbc:as400:123.123.123.123/QWERTY
11:19:59,123 DEBUG Configuration:1052 - connection.username=xxxxx
11:19:59,123 DEBUG Configuration:1052 - connection.password=xxxxx
11:19:59,123 DEBUG Configuration:1052 - dialect=org.hibernate.dialect.DB2400Dialect
11:19:59,123 DEBUG Configuration:1052 - show_sql=true
11:19:59,123 DEBUG Configuration:1052 - generate_statistics=true
11:19:59,123 DEBUG Configuration:1212 - null<-org.dom4j.tree.DefaultAttribute@12233fd [Attribute: name resource value "Account.hbm.xml"]
11:19:59,123 INFO Configuration:425 - Mapping resource: Account.hbm.xml
11:19:59,139 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
11:19:59,342 DEBUG DTDEntityResolver:50 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
11:19:59,889 INFO HbmBinder:445 - Mapping class: Account -> atfa0100
11:19:59,904 DEBUG HbmBinder:885 - Mapped property: aimsAccountProductNo -> acgicd
11:19:59,920 DEBUG HbmBinder:885 - Mapped property: aimsAccountProduct -> acj8cd
11:19:59,920 DEBUG HbmBinder:885 - Mapped property: aimsProductCode -> acabcd
11:19:59,920 DEBUG HbmBinder:885 - Mapped property: trades
11:19:59,920 INFO HbmBinder:445 - Mapping class: Trade -> atft2100
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: uniqueId -> trafnb
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: transactionDate -> tregdc
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: effectiveDate -> trehdc
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: aimsSecurityNo -> trpmcd
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: quantity -> trahqy
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: amount -> traiam
11:19:59,936 DEBUG HbmBinder:885 - Mapped property: currencyOfAmount -> trpncd
11:19:59,951 DEBUG HbmBinder:885 - Mapped property: aimsBSCode -> trg9cd
11:19:59,967 DEBUG HbmBinder:885 - Mapped property: cancelCode -> trc1st
11:20:00,029 DEBUG HbmBinder:885 - Mapped property: account -> trpgcd
11:20:00,029 INFO Configuration:1242 - Configured SessionFactory: null
11:20:00,029 DEBUG Configuration:1243 - properties: {...}
11:20:00,029 DEBUG Configuration:983 - Preparing to build session factory with filters : {}
11:20:00,029 INFO Configuration:780 - processing extends queue
11:20:00,029 INFO Configuration:784 - processing collection mappings
11:20:00,029 DEBUG HbmBinder:2099 - Second pass for collection: Account.trades
11:20:00,029 INFO HbmBinder:1723 - Mapping collection: Account.trades -> atft2100
11:20:00,029 DEBUG HbmBinder:2113 - Mapped collection key: trpgcd, one-to-many: Trade
11:20:00,045 INFO Configuration:793 - processing association property references
11:20:00,045 INFO Configuration:820 - processing foreign key constraints
11:20:00,045 DEBUG Configuration:863 - resolving reference to class: Account
11:20:00,061 INFO Dialect:90 - Using dialect: org.hibernate.dialect.DB2400Dialect
11:20:00,076 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
11:20:00,076 INFO SettingsFactory:97 - Generate SQL with comments: disabled
11:20:00,092 INFO SettingsFactory:101 - Order SQL updates by primary key: disabled
11:20:00,092 INFO SettingsFactory:265 - Query translator: org.hibernate.hql.classic.ClassicQueryTranslatorFactory
11:20:00,092 INFO SettingsFactory:109 - Query language substitutions: {}
11:20:00,092 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
11:20:00,092 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
11:20:00,108 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
11:20:00,123 INFO DriverManagerConnectionProvider:80 - using driver: com.ibm.as400.access.AS400JDBCDriver at URL: jdbc:as400:123.123.123.123/QWERTY
11:20:00,123 INFO DriverManagerConnectionProvider:83 - connection properties: {user=elaverdi, password=xxxxx}
11:20:00,139 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
11:20:00,139 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
11:20:00,717 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:as400:123.123.123.123/QWERTY, Isolation Level: 1
11:20:00,717 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
11:20:00,717 INFO SettingsFactory:158 - Scrollable result sets: enabled
11:20:00,732 DEBUG SettingsFactory:162 - Wrap result sets: disabled
11:20:00,732 INFO SettingsFactory:166 - JDBC3 getGeneratedKeys(): enabled
11:20:00,732 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
11:20:00,732 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:20:00,732 INFO SettingsFactory:178 - Automatic flush during beforeCompletion(): disabled
11:20:00,748 INFO SettingsFactory:181 - Automatic session close at end of transaction: disabled
11:20:00,748 INFO SettingsFactory:252 - Cache provider: org.hibernate.cache.EhCacheProvider
11:20:00,748 INFO SettingsFactory:189 - Second-level cache: enabled
11:20:00,748 INFO SettingsFactory:191 - Optimize cache for minimal puts: disabled
11:20:00,748 INFO SettingsFactory:199 - Query cache: disabled
11:20:00,748 INFO SettingsFactory:206 - Echoing all SQL to stdout
11:20:00,764 INFO SettingsFactory:210 - Statistics: enabled
11:20:00,764 INFO SettingsFactory:214 - Deleted entity synthetic identifier rollback: disabled
11:20:01,873 INFO SessionFactoryImpl:133 - building session factory
11:20:01,873 DEBUG SessionFactoryImpl:142 - Session factory constructed with filter configurations : {}
11:20:01,873 DEBUG SessionFactoryImpl:145 - instantiating session factory with properties: {...}
11:20:01,904 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/work/project/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
11:20:02,295 DEBUG AbstractCollectionPersister:404 - Static SQL for collection: Account.trades
11:20:02,295 DEBUG AbstractCollectionPersister:405 - Row insert: update atft2100 set trpgcd=? where trafnb=?
11:20:02,311 DEBUG AbstractCollectionPersister:407 - Row delete: update atft2100 set trpgcd=null where trpgcd=? and trafnb=?
11:20:02,311 DEBUG AbstractCollectionPersister:408 - One-shot delete: update atft2100 set trpgcd=null where trpgcd=?
11:20:02,311 DEBUG BasicEntityPersister:2032 - Static SQL for entity: Account
11:20:02,311 DEBUG BasicEntityPersister:2034 - Version select: select acgicd from atfa0100 where acgicd =?
11:20:02,311 DEBUG BasicEntityPersister:2035 - Snapshot select: select account_.acgicd, account_.acj8cd as acj8cd0_, account_.acabcd as acabcd0_ from atfa0100 account_ where account_.acgicd=?
11:20:02,311 DEBUG BasicEntityPersister:2037 - Insert 0: insert into atfa0100 (acj8cd, acabcd, acgicd) values (?, ?, ?)
11:20:02,311 DEBUG BasicEntityPersister:2038 - Update 0: update atfa0100 set acj8cd=?, acabcd=? where acgicd=?
11:20:02,326 DEBUG BasicEntityPersister:2039 - Delete 0: delete from atfa0100 where acgicd=?
11:20:02,342 DEBUG EntityLoader:91 - Static select for entity Account: select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=?
11:20:02,342 DEBUG EntityLoader:91 - Static select for entity Account: select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=?
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Account: select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=? for update with rr
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Account: select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=? for update with rr
11:20:02,358 DEBUG BasicEntityPersister:2032 - Static SQL for entity: Trade
11:20:02,358 DEBUG BasicEntityPersister:2034 - Version select: select trafnb from atft2100 where trafnb =?
11:20:02,358 DEBUG BasicEntityPersister:2035 - Snapshot select: select trade_.trafnb, trade_.tregdc as tregdc1_, trade_.trehdc as trehdc1_, trade_.trpmcd as trpmcd1_, trade_.trahqy as trahqy1_, trade_.traiam as traiam1_, trade_.trpncd as trpncd1_, trade_.trg9cd as trg9cd1_, trade_.trc1st as trc1st1_, trade_.trpgcd as trpgcd1_ from atft2100 trade_ where trade_.trafnb=?
11:20:02,358 DEBUG BasicEntityPersister:2037 - Insert 0: insert into atft2100 (tregdc, trehdc, trpmcd, trahqy, traiam, trpncd, trg9cd, trc1st, trpgcd, trafnb) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
11:20:02,358 DEBUG BasicEntityPersister:2038 - Update 0: update atft2100 set tregdc=?, trehdc=?, trpmcd=?, trahqy=?, traiam=?, trpncd=?, trg9cd=?, trc1st=?, trpgcd=? where trafnb=?
11:20:02,358 DEBUG BasicEntityPersister:2039 - Delete 0: delete from atft2100 where trafnb=?
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Trade: select trade0_.trafnb as trafnb0_, trade0_.tregdc as tregdc1_0_, trade0_.trehdc as trehdc1_0_, trade0_.trpmcd as trpmcd1_0_, trade0_.trahqy as trahqy1_0_, trade0_.traiam as traiam1_0_, trade0_.trpncd as trpncd1_0_, trade0_.trg9cd as trg9cd1_0_, trade0_.trc1st as trc1st1_0_, trade0_.trpgcd as trpgcd1_0_ from atft2100 trade0_ where trade0_.trafnb=?
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Trade: select trade0_.trafnb as trafnb0_, trade0_.tregdc as tregdc1_0_, trade0_.trehdc as trehdc1_0_, trade0_.trpmcd as trpmcd1_0_, trade0_.trahqy as trahqy1_0_, trade0_.traiam as traiam1_0_, trade0_.trpncd as trpncd1_0_, trade0_.trg9cd as trg9cd1_0_, trade0_.trc1st as trc1st1_0_, trade0_.trpgcd as trpgcd1_0_ from atft2100 trade0_ where trade0_.trafnb=?
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Trade: select trade0_.trafnb as trafnb0_, trade0_.tregdc as tregdc1_0_, trade0_.trehdc as trehdc1_0_, trade0_.trpmcd as trpmcd1_0_, trade0_.trahqy as trahqy1_0_, trade0_.traiam as traiam1_0_, trade0_.trpncd as trpncd1_0_, trade0_.trg9cd as trg9cd1_0_, trade0_.trc1st as trc1st1_0_, trade0_.trpgcd as trpgcd1_0_ from atft2100 trade0_ where trade0_.trafnb=? for update with rr
11:20:02,358 DEBUG EntityLoader:91 - Static select for entity Trade: select trade0_.trafnb as trafnb0_, trade0_.tregdc as tregdc1_0_, trade0_.trehdc as trehdc1_0_, trade0_.trpmcd as trpmcd1_0_, trade0_.trahqy as trahqy1_0_, trade0_.traiam as traiam1_0_, trade0_.trpncd as trpncd1_0_, trade0_.trg9cd as trg9cd1_0_, trade0_.trc1st as trc1st1_0_, trade0_.trpgcd as trpgcd1_0_ from atft2100 trade0_ where trade0_.trafnb=? for update with rr
11:20:02,373 DEBUG OneToManyLoader:94 - Static select for one-to-many Account.trades: select trades0_.trpgcd as trpgcd__, trades0_.trafnb as trafnb__, trades0_.trafnb as trafnb0_, trades0_.tregdc as tregdc1_0_, trades0_.trehdc as trehdc1_0_, trades0_.trpmcd as trpmcd1_0_, trades0_.trahqy as trahqy1_0_, trades0_.traiam as traiam1_0_, trades0_.trpncd as trpncd1_0_, trades0_.trg9cd as trg9cd1_0_, trades0_.trc1st as trc1st1_0_, trades0_.trpgcd as trpgcd1_0_ from atft2100 trades0_ where trades0_.trpgcd=?
11:20:02,373 DEBUG SessionFactoryObjectFactory:39).null(Unknown Source - initializing class SessionFactoryObjectFactory
11:20:02,373 DEBUG SessionFactoryObjectFactory:76 - registered: 8a20e1e80172062a010172062cc50000 (unnamed)
11:20:02,373 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
11:20:02,373 DEBUG SessionFactoryImpl:237 - instantiated session factory
11:20:02,373 INFO SessionFactoryImpl:356 - Checking 0 named queries
11:20:02,404 DEBUG SessionImpl:214 - opened session
11:20:02,420 DEBUG JDBCTransaction:38 - begin
11:20:02,420 DEBUG AbstractBatcher:377 - opening JDBC connection
11:20:02,420 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
11:20:02,420 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
11:20:02,420 DEBUG JDBCTransaction:42 - current autocommit status: false
11:20:02,420 DEBUG DefaultLoadEventListener:185 - loading entity: [Account#0123ABC]
11:20:02,420 DEBUG DefaultLoadEventListener:219 - creating new proxy for entity
11:20:02,436 DEBUG DefaultLoadEventListener:291 - attempting to resolve: [Account#0123ABC]
11:20:02,436 DEBUG DefaultLoadEventListener:327 - object not resolved in any cache: [Account#0123ABC]
11:20:02,436 DEBUG BasicEntityPersister:2299 - Materializing entity: [Account#0123ABC]
11:20:02,436 DEBUG AbstractBatcher:252 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:20:02,451 DEBUG SQL:290 - select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=?
Hibernate: select account0_.acgicd as acgicd0_, account0_.acj8cd as acj8cd0_0_, account0_.acabcd as acabcd0_0_ from atfa0100 account0_ where account0_.acgicd=?
11:20:02,451 DEBUG AbstractBatcher:341 - preparing statement
11:20:02,545 DEBUG StringType:46 - binding '0123ABC' to parameter: 1
11:20:02,639 DEBUG AbstractBatcher:268 - about to open ResultSet (open ResultSets: 0, globally: 0)
11:20:02,654 DEBUG Loader:1097 - Using naked result set
11:20:02,654 DEBUG Loader:361 - processing result set
11:20:02,654 DEBUG Loader:643 - result row: EntityKey[Account#0123ABC]
11:20:02,654 DEBUG Loader:785 - Initializing object from ResultSet: EntityKey[Account#0123ABC]
11:20:02,654 DEBUG BasicEntityPersister:1488 - Hydrating entity: [Account#0123ABC]
11:20:02,654 DEBUG StringType:68 - returning '0123A ' as column: acj8cd0_0_
11:20:02,654 DEBUG StringType:68 - returning 'AAA' as column: acabcd0_0_
11:20:02,654 DEBUG Loader:381 - done processing result set (1 rows)
11:20:02,670 DEBUG AbstractBatcher:275 - about to close ResultSet (open ResultSets: 1, globally: 1)
11:20:02,670 DEBUG AbstractBatcher:260 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:20:02,670 DEBUG AbstractBatcher:361 - closing statement
11:20:02,686 DEBUG Loader:424 - total objects hydrated: 1
11:20:02,686 DEBUG TwoPhaseLoad:79 - resolving associations for [Account#0123ABC]
11:20:02,701 DEBUG PersistentCollectionType:314 - creating collection wrapper:[Account.trades#0123ABC]
11:20:02,701 DEBUG TwoPhaseLoad:137 - done materializing entity [Account#0123ABC]
11:20:02,701 DEBUG PersistentContext:656 - initializing non-lazy collections
11:20:02,701 DEBUG DefaultInitializeCollectionEventListener:35 - initializing collection [Account.trades#0123ABC]
11:20:02,701 DEBUG DefaultInitializeCollectionEventListener:40 - checking second-level cache
11:20:02,701 DEBUG DefaultInitializeCollectionEventListener:52 - collection not cached
11:20:02,701 DEBUG AbstractBatcher:252 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
11:20:02,701 DEBUG SQL:290 - select trades0_.trpgcd as trpgcd__, trades0_.trafnb as trafnb__, trades0_.trafnb as trafnb0_, trades0_.tregdc as tregdc1_0_, trades0_.trehdc as trehdc1_0_, trades0_.trpmcd as trpmcd1_0_, trades0_.trahqy as trahqy1_0_, trades0_.traiam as traiam1_0_, trades0_.trpncd as trpncd1_0_, trades0_.trg9cd as trg9cd1_0_, trades0_.trc1st as trc1st1_0_, trades0_.trpgcd as trpgcd1_0_ from atft2100 trades0_ where trades0_.trpgcd=?
Hibernate: select trades0_.trpgcd as trpgcd__, trades0_.trafnb as trafnb__, trades0_.trafnb as trafnb0_, trades0_.tregdc as tregdc1_0_, trades0_.trehdc as trehdc1_0_, trades0_.trpmcd as trpmcd1_0_, trades0_.trahqy as trahqy1_0_, trades0_.traiam as traiam1_0_, trades0_.trpncd as trpncd1_0_, trades0_.trg9cd as trg9cd1_0_, trades0_.trc1st as trc1st1_0_, trades0_.trpgcd as trpgcd1_0_ from atft2100 trades0_ where trades0_.trpgcd=?
11:20:02,717 DEBUG AbstractBatcher:341 - preparing statement
11:20:02,779 DEBUG StringType:46 - binding '0123ABC' to parameter: 1
11:20:02,826 DEBUG AbstractBatcher:268 - about to open ResultSet (open ResultSets: 0, globally: 0)
11:20:02,826 DEBUG Loader:1097 - Using naked result set
11:20:02,826 DEBUG Loader:555 - result set contains (possibly empty) collection: [Account.trades#0123ABC]
11:20:02,842 DEBUG PersistentContext:615 - uninitialized collection: initializing
11:20:02,842 DEBUG Loader:361 - processing result set
11:20:02,842 DEBUG LongType:68 - returning '66936889' as column: trafnb0_
11:20:02,842 DEBUG Loader:643 - result row: EntityKey[Trade#66936889]
11:20:02,842 DEBUG Loader:785 - Initializing object from ResultSet: EntityKey[Trade#66936889]
11:20:02,842 DEBUG BasicEntityPersister:1488 - Hydrating entity: [Trade#66936889]
11:20:02,842 DEBUG StringType:68 - returning '20041207' as column: tregdc1_0_
11:20:02,842 DEBUG StringType:68 - returning '20041207' as column: trehdc1_0_
11:20:02,842 DEBUG StringType:68 - returning '223342 ' as column: trpmcd1_0_
11:20:02,842 DEBUG StringType:68 - returning '85.000' as column: trahqy1_0_
11:20:02,842 DEBUG StringType:68 - returning '0.00' as column: traiam1_0_
11:20:02,842 DEBUG StringType:68 - returning 'CAD' as column: trpncd1_0_
11:20:02,842 DEBUG StringType:68 - returning 'AS ' as column: trg9cd1_0_
11:20:02,858 DEBUG StringType:68 - returning 'Y' as column: trc1st1_0_
11:20:02,858 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd1_0_
11:20:02,858 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd__
11:20:02,858 DEBUG Loader:496 - found row of collection: [Account.trades#0123ABC ]
11:20:02,858 DEBUG PersistentContext:627 - new collection: instantiating
11:20:02,858 DEBUG LongType:68 - returning '66936889' as column: trafnb__
11:20:02,858 DEBUG DefaultLoadEventListener:185 - loading entity: [Trade#66936889]
11:20:02,858 DEBUG DefaultLoadEventListener:200 - entity found in session cache
11:20:02,858 DEBUG DefaultLoadEventListener:291 - attempting to resolve: [Trade#66936889]
11:20:02,858 DEBUG DefaultLoadEventListener:300 - resolved object in session cache: [Trade#66936889]
11:20:02,858 DEBUG LongType:68 - returning '66936890' as column: trafnb0_
11:20:02,858 DEBUG Loader:643 - result row: EntityKey[Trade#66936890]
11:20:02,858 DEBUG Loader:785 - Initializing object from ResultSet: EntityKey[Trade#66936890]
11:20:02,858 DEBUG BasicEntityPersister:1488 - Hydrating entity: [Trade#66936890]
11:20:02,873 DEBUG StringType:68 - returning '20041207' as column: tregdc1_0_
11:20:02,873 DEBUG StringType:68 - returning '20041207' as column: trehdc1_0_
11:20:02,873 DEBUG StringType:68 - returning '223342 ' as column: trpmcd1_0_
11:20:02,873 DEBUG StringType:68 - returning '-90910.000' as column: trahqy1_0_
11:20:02,889 DEBUG StringType:68 - returning '-105370.60' as column: traiam1_0_
11:20:02,889 DEBUG StringType:68 - returning 'CAD' as column: trpncd1_0_
11:20:02,889 DEBUG StringType:68 - returning 'AS ' as column: trg9cd1_0_
11:20:02,889 DEBUG StringType:68 - returning 'N' as column: trc1st1_0_
11:20:02,889 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd1_0_
11:20:02,889 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd__
11:20:02,889 DEBUG Loader:496 - found row of collection: [Account.trades#0123ABC ]
11:20:02,889 DEBUG PersistentContext:638 - reading row
11:20:02,889 DEBUG LongType:68 - returning '66936890' as column: trafnb__
11:20:02,889 DEBUG DefaultLoadEventListener:185 - loading entity: [Trade#66936890]
11:20:02,889 DEBUG DefaultLoadEventListener:200 - entity found in session cache
11:20:02,889 DEBUG DefaultLoadEventListener:291 - attempting to resolve: [Trade#66936890]
11:20:02,889 DEBUG DefaultLoadEventListener:300 - resolved object in session cache: [Trade#66936890]
11:20:02,904 DEBUG LongType:68 - returning '67105964' as column: trafnb0_
11:20:02,904 DEBUG Loader:643 - result row: EntityKey[Trade#67105964]
11:20:02,904 DEBUG Loader:785 - Initializing object from ResultSet: EntityKey[Trade#67105964]
11:20:02,904 DEBUG BasicEntityPersister:1488 - Hydrating entity: [Trade#67105964]
11:20:02,904 DEBUG StringType:68 - returning '20041207' as column: tregdc1_0_
11:20:02,904 DEBUG StringType:68 - returning '20041207' as column: trehdc1_0_
11:20:02,904 DEBUG StringType:68 - returning '223342 ' as column: trpmcd1_0_
11:20:02,904 DEBUG StringType:68 - returning '85.000' as column: trahqy1_0_
11:20:02,904 DEBUG StringType:68 - returning '98.60' as column: traiam1_0_
11:20:02,904 DEBUG StringType:68 - returning 'CAD' as column: trpncd1_0_
11:20:02,904 DEBUG StringType:68 - returning 'AS ' as column: trg9cd1_0_
11:20:02,904 DEBUG StringType:68 - returning 'Y' as column: trc1st1_0_
11:20:02,904 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd1_0_
11:20:02,920 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd__
11:20:02,920 DEBUG Loader:496 - found row of collection: [Account.trades#0123ABC ]
11:20:02,920 DEBUG PersistentContext:638 - reading row
11:20:02,920 DEBUG LongType:68 - returning '67105964' as column: trafnb__
11:20:02,920 DEBUG DefaultLoadEventListener:185 - loading entity: [Trade#67105964]
11:20:02,920 DEBUG DefaultLoadEventListener:200 - entity found in session cache
11:20:02,936 DEBUG DefaultLoadEventListener:291 - attempting to resolve: [Trade#67105964]
11:20:02,936 DEBUG DefaultLoadEventListener:300 - resolved object in session cache: [Trade#67105964]
11:20:02,936 DEBUG LongType:68 - returning '67105965' as column: trafnb0_
11:20:02,936 DEBUG Loader:643 - result row: EntityKey[Trade#67105965]
11:20:02,936 DEBUG Loader:785 - Initializing object from ResultSet: EntityKey[Trade#67105965]
11:20:02,936 DEBUG BasicEntityPersister:1488 - Hydrating entity: [Trade#67105965]
11:20:02,936 DEBUG StringType:68 - returning '20041207' as column: tregdc1_0_
11:20:02,936 DEBUG StringType:68 - returning '20041207' as column: trehdc1_0_
11:20:02,936 DEBUG StringType:68 - returning '223342 ' as column: trpmcd1_0_
11:20:02,936 DEBUG StringType:68 - returning '-85.000' as column: trahqy1_0_
11:20:02,936 DEBUG StringType:68 - returning '0.00' as column: traiam1_0_
11:20:02,936 DEBUG StringType:68 - returning 'CAD' as column: trpncd1_0_
11:20:02,936 DEBUG StringType:68 - returning 'AS ' as column: trg9cd1_0_
11:20:02,936 DEBUG StringType:68 - returning 'N' as column: trc1st1_0_
11:20:02,951 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd1_0_
11:20:02,951 DEBUG StringType:68 - returning '0123ABC ' as column: trpgcd__
11:20:02,951 DEBUG Loader:496 - found row of collection: [Account.trades#0123ABC ]
11:20:02,951 DEBUG PersistentContext:638 - reading row
11:20:02,951 DEBUG LongType:68 - returning '67105965' as column: trafnb__
11:20:02,951 DEBUG DefaultLoadEventListener:185 - loading entity: [Trade#67105965]
11:20:02,951 DEBUG DefaultLoadEventListener:200 - entity found in session cache
11:20:02,951 DEBUG DefaultLoadEventListener:291 - attempting to resolve: [Trade#67105965]
11:20:02,951 DEBUG DefaultLoadEventListener:300 - resolved object in session cache: [Trade#67105965]
11:20:02,951 DEBUG Loader:381 - done processing result set (4 rows)
11:20:02,951 DEBUG AbstractBatcher:275 - about to close ResultSet (open ResultSets: 1, globally: 1)
11:20:02,967 DEBUG AbstractBatcher:260 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
11:20:02,967 DEBUG AbstractBatcher:361 - closing statement
11:20:02,998 DEBUG Loader:424 - total objects hydrated: 4
11:20:02,998 DEBUG TwoPhaseLoad:79 - resolving associations for [Trade#66936889]
11:20:02,998 DEBUG DefaultLoadEventListener:185 - loading entity: [Account#0123ABC ]
11:20:02,998 DEBUG DefaultLoadEventListener:219 - creating new proxy for entity
11:20:02,998 DEBUG TwoPhaseLoad:137 - done materializing entity [Trade#66936889]
11:20:02,998 DEBUG TwoPhaseLoad:79 - resolving associations for [Trade#66936890]
11:20:02,998 DEBUG DefaultLoadEventListener:185 - loading entity: [Account#0123ABC ]
11:20:02,998 DEBUG DefaultLoadEventListener:214 - entity proxy found in session cache
11:20:02,998 DEBUG TwoPhaseLoad:137 - done materializing entity [Trade#66936890]
11:20:02,998 DEBUG TwoPhaseLoad:79 - resolving associations for [Trade#67105964]
11:20:03,014 DEBUG DefaultLoadEventListener:185 - loading entity: [Account#0123ABC ]
11:20:03,014 DEBUG DefaultLoadEventListener:214 - entity proxy found in session cache
11:20:03,014 DEBUG TwoPhaseLoad:137 - done materializing entity [Trade#67105964]
11:20:03,014 DEBUG TwoPhaseLoad:79 - resolving associations for [Trade#67105965]
11:20:03,014 DEBUG DefaultLoadEventListener:185 - loading entity: [Account#0123ABC ]
11:20:03,014 DEBUG DefaultLoadEventListener:214 - entity proxy found in session cache
11:20:03,014 DEBUG TwoPhaseLoad:137 - done materializing entity [Trade#67105965]
11:20:03,014 DEBUG PersistentContext:698 - 2 collections were found in result set
11:20:03,014 DEBUG PersistentContext:727 - collection fully initialized: [Account.trades#0123ABC ]
11:20:03,014 DEBUG PersistentContext:727 - collection fully initialized: [Account.trades#0123ABC]
11:20:03,014 DEBUG PersistentContext:706 - 2 collections initialized
11:20:03,014 DEBUG PersistentContext:656 - initializing non-lazy collections
11:20:03,014 DEBUG DefaultInitializeCollectionEventListener:54 - collection initialized
11:20:03,029 DEBUG Account:92 - getting trades ! lenght: 0