My Basic problem is this. I've got a <version> property mapped in my hibernate mapping file. I have at one point inserted the initial version (version id 0) into the database.
In my dao class, I load the record, then i make a change to the record.
At this point, i then do a session.save(auditVersion) on the object.
I can see in the log information that it's incrementing the version
from 0 to 1. However, it's never updating the java object in memory.
As a result, auditVersion.getVersion() keeps returning 0 unless i deliberately requery it with the Criteria instance. I have tried
reloading with session.evict(), session.load(), session.lock(),
session.refresh(), but they all still have the old version id.
The basic point of what I'm trying to do is to build a persistence
auditor which keeps track of history. I have a basic AuditRecord
class which is inserted into the database on every operation
which records the object type, the identifier, the date, the user,
and the operation. I also want it to have a version
number, so I can retrieve them in order (timestamps don't guarantee
the right order).
So, I have my AuditRecordVersion class which uses hibernate versioning, and after I insert the AuditRecord, I update the AuditRecordVersion to point to the most recent AuditRecord that was inserted. I then update
the "version" property in the AuditRecord with the current version of the AuditRecordVersion.
However, as I've said, unless i reload the object, the version isn't updated,
so I end up with an audit record that has the exact same version attribute as the previous audit record.
Anyone have any idea why the version isn't updated in memory, or how I can force it to be, without having to requery the database.
Hibernate version: 3.0.2
Mapping documents:
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>
<class name="com.synygy.core.audit.AuditRecordVersionImpl"
table="AUDIT_RECORD_VERSION"
lazy="false">
<id name="id" column="ID">
<generator class="native"/>
</id>
<version name="version" column="VERSION" type="long"
unsaved-value="null" />
<property name="objectClass" column="OBJECT_CLASS"/>
<property name="objectId" column="OBJECT_ID"/>
<property name="auditRecordId" column="AUDIT_RECORD_ID" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close(): Code:
Criteria crit = session.createCriteria(AuditRecordVersionImpl.class);
crit.add(Expression.eq("objectClass", object.getClass().getName()));
crit.add(Expression.eq("objectId", id));
AuditRecordVersion auditVersion =
(AuditRecordVersion)crit.uniqueResult();
AuditRecordImpl auditRecord = new AuditRecordImpl();
auditRecord.setObjectClass(object.getClass().getName());
auditRecord.setObjectId(id);
auditRecord.setOperation(AuditOperation.UPDATE);
auditRecord.setUserName(getCurrentUser());
session.save(auditRecord);
auditVersion.setAuditRecordId(auditRecord.getId());
session.update(auditVersion);
// Why should i have to do this, should hibernate take
// care of updating the version property for me?
auditVersion = (AuditRecordVersion)crit.uniqueResult();
auditRecord.setVersion(auditVersion.getVersion());
session.update(auditRecord);
Full stack trace of any exception that occurs:Name and version of the database you are using:The generated SQL (show_sql=true):Debug level Hibernate log excerpt:Code:
DEBUG [Finalizer] JDBCContext - running Session.finalize()
DEBUG [main] DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
DEBUG [main] DTDEntityResolver - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
INFO [main] HbmBinder - Mapping class: com.synygy.core.audit.AuditRecordImpl -> AUDIT_RECORD
DEBUG [main] HbmBinder - Mapped property: id -> ID
DEBUG [main] HbmBinder - Mapped property: effective -> effective
DEBUG [main] HbmBinder - Mapped property: objectClass -> OBJECT_CLASS
DEBUG [main] HbmBinder - Mapped property: objectId -> OBJECT_ID
DEBUG [main] HbmBinder - Mapped property: userName -> USERNAME
DEBUG [main] HbmBinder - Mapped property: version -> VERSION
DEBUG [main] HbmBinder - Mapped property: operation -> OPERATION
DEBUG [main] DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
DEBUG [main] DTDEntityResolver - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
INFO [main] HbmBinder - Mapping class: com.synygy.core.audit.AuditRecordVersionImpl -> AUDIT_RECORD_VERSION
DEBUG [main] HbmBinder - Mapped property: id -> ID
DEBUG [main] HbmBinder - Mapped property: version -> VERSION
DEBUG [main] HbmBinder - Mapped property: objectClass -> OBJECT_CLASS
DEBUG [main] HbmBinder - Mapped property: objectId -> OBJECT_ID
DEBUG [main] HbmBinder - Mapped property: auditRecordId -> AUDIT_RECORD_ID
INFO [main] AnnotationConfiguration - Mapping class using metadata: com.synygy.core.persistence.MyObject
DEBUG [main] EntityBinder - Import with entity name=MyObject
DEBUG [main] AnnotationBinder - Processing com.synygy.core.persistence.MyObject per property access
DEBUG [main] AnnotationBinder - Processing annotations of com.synygy.core.persistence.MyObject.id
DEBUG [main] Ejb3Column - Binding column ID unique false
DEBUG [main] AnnotationBinder - id is an id
DEBUG [main] AnnotationBinder - making simplevalue for id
DEBUG [main] AnnotationBinder - Building property id
DEBUG [main] AnnotationBinder - Cascading id with null
DEBUG [main] AnnotationBinder - Bind @EmbeddedId on id
DEBUG [main] AnnotationBinder - Processing annotations of com.synygy.core.persistence.MyObject.name
DEBUG [main] Ejb3Column - Binding column NAME unique false
DEBUG [main] AnnotationBinder - binding property name with lazy=false
DEBUG [main] AnnotationBinder - making simplevalue for name
DEBUG [main] AnnotationBinder - Building property name
DEBUG [main] AnnotationBinder - Cascading name with null
DEBUG [main] AnnotationBinder - Processing annotations of com.synygy.core.persistence.MyObject.projectId
DEBUG [main] Ejb3Column - Binding column PROJECT_ID unique false
DEBUG [main] AnnotationBinder - binding property projectId with lazy=false
DEBUG [main] AnnotationBinder - making simplevalue for projectId
DEBUG [main] AnnotationBinder - Building property projectId
DEBUG [main] AnnotationBinder - Cascading projectId with null
DEBUG [main] AnnotationBinder - Processing annotations of com.synygy.core.persistence.MyObject.foo
DEBUG [main] Ejb3Column - Binding column FOO unique false
DEBUG [main] AnnotationBinder - binding property foo with lazy=false
DEBUG [main] AnnotationBinder - making simplevalue for foo
DEBUG [main] AnnotationBinder - Building property foo
DEBUG [main] AnnotationBinder - Cascading foo with null
DEBUG [main] Configuration - Preparing to build session factory with filters : {}
DEBUG [main] AnnotationConfiguration - processing manytoone fk mappings
INFO [main] Configuration - processing extends queue
INFO [main] Configuration - processing collection mappings
INFO [main] Configuration - processing association property references
INFO [main] Configuration - processing foreign key constraints
INFO [main] ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
INFO [main] SettingsFactory - RDBMS: HSQL Database Engine, version: 1.7.3
INFO [main] SettingsFactory - JDBC driver: HSQL Database Engine Driver, version: 1.7.3
INFO [main] Dialect - Using dialect: org.hibernate.dialect.HSQLDialect
INFO [main] SettingsFactory - JDBC batch size: 15
INFO [main] SettingsFactory - JDBC batch updates for versioned data: disabled
INFO [main] SettingsFactory - Scrollable result sets: enabled
DEBUG [main] SettingsFactory - Wrap result sets: disabled
INFO [main] SettingsFactory - JDBC3 getGeneratedKeys(): disabled
INFO [main] SettingsFactory - Aggressive release : disabled
INFO [main] SettingsFactory - Default batch fetch size: 1
INFO [main] SettingsFactory - Generate SQL with comments: disabled
INFO [main] SettingsFactory - Order SQL updates by primary key: disabled
INFO [main] SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO [main] ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
INFO [main] SettingsFactory - Query language substitutions: {}
INFO [main] TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
INFO [main] TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO [main] SettingsFactory - Automatic flush during beforeCompletion(): disabled
INFO [main] SettingsFactory - Automatic session close at end of transaction: disabled
INFO [main] SettingsFactory - Second-level cache: enabled
INFO [main] SettingsFactory - Query cache: disabled
INFO [main] SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
INFO [main] SettingsFactory - Optimize cache for minimal puts: disabled
INFO [main] SettingsFactory - Structured second-level cache entries: enabled
DEBUG [main] SQLExceptionConverterFactory - Using dialect defined converter
INFO [main] SettingsFactory - Statistics: disabled
INFO [main] SettingsFactory - Deleted entity synthetic identifier rollback: disabled
INFO [main] SettingsFactory - Default entity-mode: pojo
INFO [main] SessionFactoryImpl - building session factory
DEBUG [main] SessionFactoryImpl - Session factory constructed with filter configurations : {}
DEBUG [main] SessionFactoryImpl - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=E:\SynDev\jdk1.5.0_01\jre\bin, java.vm.version=1.5.0_01-b08, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=E:\eim, java.runtime.version=1.5.0_01-b08, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=E:\SynDev\jdk1.5.0_01\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=e:\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.jnu.encoding=Cp1252, java.library.path=E:\SynDev\jdk1.5.0_01\bin;.;C:\WINNT\system32;C:\WINNT;e:\SynDev\Perl\bin\;E:\ora9ias\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Starbase\StarGate SDK\Lib;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Subversion\bin;;e:\Sun\AppServer\bin;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\SynDev\Microsoft Visual Studio\VC98\bin;E:\module-eim-rearch-jsf-spring\dev\java\lib;E:\SynDev\j2ee1.4.2\bin;E:\SynDev\j2sdk1.4.2_06\bin;E:\groovy-1.0-beta-6\bin;E:\SynDev\apache-ant-1.6.2\bin;E:\cygwin\bin;E:\cygwin\usr\bin;E:\cygwin\usr\local\bin;E:\SynDev\maven-1.0.2\bin;e:\SynDev\Subversion\bin;C:\Program Files\TortoiseSVN\bin;E:\cygwin\bin;e:\cygwin\usr\bin;C:\Program Files\Subversion\bin;E:\SynDev\jakarta-tomcat-5.0.28\shared\lib;E:\SynDev\vss\win32, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.0, user.home=C:\Documents and Settings\inger, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=windows-1252, java.specification.version=1.5, user.name=inger, java.class.path=E:\SynDev\jdk1.5.0_01\jre\lib\charsets.jar;E:\SynDev\jdk1.5.0_01\jre\lib\deploy.jar;E:\SynDev\jdk1.5.0_01\jre\lib\javaws.jar;E:\SynDev\jdk1.5.0_01\jre\lib\jce.jar;E:\SynDev\jdk1.5.0_01\jre\lib\jsse.jar;E:\SynDev\jdk1.5.0_01\jre\lib\plugin.jar;E:\SynDev\jdk1.5.0_01\jre\lib\rt.jar;E:\SynDev\jdk1.5.0_01\jre\lib\ext\dnsns.jar;E:\SynDev\jdk1.5.0_01\jre\lib\ext\localedata.jar;E:\SynDev\jdk1.5.0_01\jre\lib\ext\sunjce_provider.jar;E:\SynDev\jdk1.5.0_01\jre\lib\ext\sunpkcs11.jar;E:\eim\core\target\test-classes;E:\eim\core\target\classes;C:\Documents and Settings\inger\.maven\repository\jsqldriver\jars\JSQLConnect-1.0.jar;C:\Documents and Settings\inger\.maven\repository\antlr\jars\antlr-2.7.2.jar;C:\Documents and Settings\inger\.maven\repository\aopalliance\jars\aopalliance-1.0.jar;C:\Documents and Settings\inger\.maven\repository\cglib\jars\cglib-full-2.0.2.jar;C:\Documents and Settings\inger\.maven\repository\oracle\jars\classes12.jar;C:\Documents and Settings\inger\.maven\repository\commons-beanutils\jars\commons-beanutils-1.7.0.jar;C:\Documents and Settings\inger\.maven\repository\commons-betwixt\jars\commons-betwixt-1.0-alpha-1.jar;C:\Documents and Settings\inger\.maven\repository\commons-collections\jars\commons-collections-2.1.1.jar;C:\Documents and Settings\inger\.maven\repository\commons-dbcp\jars\commons-dbcp-1.2.jar;C:\Documents and Settings\inger\.maven\repository\commons-digester\jars\commons-digester-1.5.jar;C:\Documents and Settings\inger\.maven\repository\commons-lang\jars\commons-lang-2.0.jar;C:\Documents and Settings\inger\.maven\repository\commons-logging\jars\commons-logging-1.0.4.jar;C:\Documents and Settings\inger\.maven\repository\commons-pool\jars\commons-pool-1.2.jar;C:\Documents and Settings\inger\.maven\repository\dom4j\jars\dom4j-1.6.jar;C:\Documents and Settings\inger\.maven\repository\easymock\jars\easymock-1.1.jar;C:\Documents and Settings\inger\.maven\repository\ehcache\jars\ehcache-1.1.jar;C:\Documents and Settings\inger\.maven\repository\ejb\jars\ejb-3.0-edr2.jar;C:\Documents and Settings\inger\.maven\repository\emma\jars\emma-2.0.latest.jar;C:\Documents and Settings\inger\.maven\repository\emma\jars\emma_ant-2.0.latest.jar;C:\Documents and Settings\inger\.maven\repository\hibernate\jars\hibernate-3.0.2.jar;C:\Documents and Settings\inger\.maven\repository\hibernate\jars\hibernate-annotations-3.0beta1.jar;C:\Documents and Settings\inger\.maven\repository\hsqldb\jars\hsqldb-1.7.3.0.jar;C:\Documents and Settings\inger\.maven\repository\jsf\jars\jsf-api-1.0.jar;C:\Documents and Settings\inger\.maven\repository\jsf\jars\jsf-impl-1.0.jar;C:\Documents and Settings\inger\.maven\repository\jspapi\jars\jsp-api-2.0-20040521.jar;C:\Documents and Settings\inger\.maven\repository\jstl\jars\jstl-1.0.jar;C:\Documents and Settings\inger\.maven\repository\jta\jars\jta-1.0.1.jar;C:\Documents and Settings\inger\.maven\repository\junit\jars\junit-3.8.1.jar;C:\Documents and Settings\inger\.maven\repository\log4j\jars\log4j-1.2.9.jar;C:\Documents and Settings\inger\.maven\repository\odmg\jars\odmg-3.0.jar;C:\Documents and Settings\inger\.maven\repository\ognl\jars\ognl-2.6.3.jar;C:\Documents and Settings\inger\.maven\repository\regexp\jars\regexp-1.2.jar;C:\Documents and Settings\inger\.maven\repository\servletapi\jars\servlet-api-2.4-20040521.jar;C:\Documents and Settings\inger\.maven\repository\springframework\jars\spring-1.2-rc2.jar;C:\Documents and Settings\inger\.maven\repository\springframework\jars\spring-hibernate3-jdk5-3.0a.jar;C:\Documents and Settings\inger\.maven\repository\eim\jars\testutils-SNAPSHOT.jar;C:\Documents and Settings\inger\.maven\repository\xalan\jars\xalan-2.6.0.jar;C:\Documents and Settings\inger\.maven\repository\xdiff\jars\xdiff-0.9.7.jar;C:\Documents and Settings\inger\.maven\repository\xerces\jars\xerces-2.6.2.jar;C:\Documents and Settings\inger\.maven\repository\xmlunit\jars\xmlunit-1.0.jar;C:\Documents and Settings\inger\.maven\repository\xpp3\jars\xpp3-1.1.3.3.jar;C:\Documents and Settings\inger\.maven\repository\xstream\jars\xstream-1.1.1.jar;E:\eim\testutils\target\test-classes;E:\eim\testutils\target\classes;E:\SynDev\IntelliJ-IDEA-4.5\lib\idea_rt.jar, java.vm.specification.version=1.0, java.home=E:\SynDev\jdk1.5.0_01\jre, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.HSQLDialect, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.5.0_01, java.ext.dirs=E:\SynDev\jdk1.5.0_01\jre\lib\ext, sun.boot.class.path=E:\SynDev\jdk1.5.0_01\jre\lib\rt.jar;E:\SynDev\jdk1.5.0_01\jre\lib\i18n.jar;E:\SynDev\jdk1.5.0_01\jre\lib\sunrsasign.jar;E:\SynDev\jdk1.5.0_01\jre\lib\jsse.jar;E:\SynDev\jdk1.5.0_01\jre\lib\jce.jar;E:\SynDev\jdk1.5.0_01\jre\lib\charsets.jar;E:\SynDev\jdk1.5.0_01\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.connection.provider_class=org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider, hibernate.hbm2ddl.auto=create, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
DEBUG [main] BasicEntityPersister - Static SQL for entity: com.synygy.core.audit.AuditRecordImpl
DEBUG [main] BasicEntityPersister - Version select: select effective from AUDIT_RECORD where ID =?
DEBUG [main] BasicEntityPersister - Snapshot select: select auditrecor_.ID, auditrecor_.effective as effective3_, auditrecor_.OBJECT_CLASS as OBJECT3_3_, auditrecor_.OBJECT_ID as OBJECT4_3_, auditrecor_.USERNAME as USERNAME3_, auditrecor_.VERSION as VERSION3_, auditrecor_.OPERATION as OPERATION3_ from AUDIT_RECORD auditrecor_ where auditrecor_.ID=?
DEBUG [main] BasicEntityPersister - Insert 0: insert into AUDIT_RECORD (effective, OBJECT_CLASS, OBJECT_ID, USERNAME, VERSION, OPERATION, ID) values (?, ?, ?, ?, ?, ?, ?)
DEBUG [main] BasicEntityPersister - Update 0: update AUDIT_RECORD set effective=?, OBJECT_CLASS=?, OBJECT_ID=?, USERNAME=?, VERSION=?, OPERATION=? where ID=? and effective=?
DEBUG [main] BasicEntityPersister - Delete 0: delete from AUDIT_RECORD where ID=? and effective=?
DEBUG [main] BasicEntityPersister - Identity insert: insert into AUDIT_RECORD (effective, OBJECT_CLASS, OBJECT_ID, USERNAME, VERSION, OPERATION, ID) values (?, ?, ?, ?, ?, ?, null)
DEBUG [main] BasicEntityPersister - Static SQL for entity: com.synygy.core.audit.AuditRecordVersionImpl
DEBUG [main] BasicEntityPersister - Version select: select VERSION from AUDIT_RECORD_VERSION where ID =?
DEBUG [main] BasicEntityPersister - Snapshot select: select auditrecor_.ID, auditrecor_.VERSION as VERSION4_, auditrecor_.OBJECT_CLASS as OBJECT3_4_, auditrecor_.OBJECT_ID as OBJECT4_4_, auditrecor_.AUDIT_RECORD_ID as AUDIT5_4_ from AUDIT_RECORD_VERSION auditrecor_ where auditrecor_.ID=?
DEBUG [main] BasicEntityPersister - Insert 0: insert into AUDIT_RECORD_VERSION (VERSION, OBJECT_CLASS, OBJECT_ID, AUDIT_RECORD_ID, ID) values (?, ?, ?, ?, ?)
DEBUG [main] BasicEntityPersister - Update 0: update AUDIT_RECORD_VERSION set VERSION=?, OBJECT_CLASS=?, OBJECT_ID=?, AUDIT_RECORD_ID=? where ID=? and VERSION=?
DEBUG [main] BasicEntityPersister - Delete 0: delete from AUDIT_RECORD_VERSION where ID=? and VERSION=?
DEBUG [main] BasicEntityPersister - Identity insert: insert into AUDIT_RECORD_VERSION (VERSION, OBJECT_CLASS, OBJECT_ID, AUDIT_RECORD_ID, ID) values (?, ?, ?, ?, null)
DEBUG [main] BasicEntityPersister - Static SQL for entity: com.synygy.core.persistence.MyObject
DEBUG [main] BasicEntityPersister - Version select: select ID from MY_OBJECT_TABLE where ID =?
DEBUG [main] BasicEntityPersister - Snapshot select: select myobject_.ID, myobject_.NAME as NAME5_, myobject_.PROJECT_ID as PROJECT3_5_, myobject_.FOO as FOO5_ from MY_OBJECT_TABLE myobject_ where myobject_.ID=?
DEBUG [main] BasicEntityPersister - Insert 0: insert into MY_OBJECT_TABLE (NAME, PROJECT_ID, FOO, ID) values (?, ?, ?, ?)
DEBUG [main] BasicEntityPersister - Update 0: update MY_OBJECT_TABLE set NAME=?, PROJECT_ID=?, FOO=? where ID=?
DEBUG [main] BasicEntityPersister - Delete 0: delete from MY_OBJECT_TABLE where ID=?
DEBUG [main] BasicEntityPersister - Identity insert: insert into MY_OBJECT_TABLE (NAME, PROJECT_ID, FOO, ID) values (?, ?, ?, null)
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordImpl: select auditrecor0_.ID as ID0_, auditrecor0_.effective as effective3_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_3_0_, auditrecor0_.OBJECT_ID as OBJECT4_3_0_, auditrecor0_.USERNAME as USERNAME3_0_, auditrecor0_.VERSION as VERSION3_0_, auditrecor0_.OPERATION as OPERATION3_0_ from AUDIT_RECORD auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordImpl: select auditrecor0_.ID as ID0_, auditrecor0_.effective as effective3_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_3_0_, auditrecor0_.OBJECT_ID as OBJECT4_3_0_, auditrecor0_.USERNAME as USERNAME3_0_, auditrecor0_.VERSION as VERSION3_0_, auditrecor0_.OPERATION as OPERATION3_0_ from AUDIT_RECORD auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordImpl: select auditrecor0_.ID as ID0_, auditrecor0_.effective as effective3_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_3_0_, auditrecor0_.OBJECT_ID as OBJECT4_3_0_, auditrecor0_.USERNAME as USERNAME3_0_, auditrecor0_.VERSION as VERSION3_0_, auditrecor0_.OPERATION as OPERATION3_0_ from AUDIT_RECORD auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordImpl: select auditrecor0_.ID as ID0_, auditrecor0_.effective as effective3_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_3_0_, auditrecor0_.OBJECT_ID as OBJECT4_3_0_, auditrecor0_.USERNAME as USERNAME3_0_, auditrecor0_.VERSION as VERSION3_0_, auditrecor0_.OPERATION as OPERATION3_0_ from AUDIT_RECORD auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordVersionImpl: select auditrecor0_.ID as ID0_, auditrecor0_.VERSION as VERSION4_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_4_0_, auditrecor0_.OBJECT_ID as OBJECT4_4_0_, auditrecor0_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordVersionImpl: select auditrecor0_.ID as ID0_, auditrecor0_.VERSION as VERSION4_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_4_0_, auditrecor0_.OBJECT_ID as OBJECT4_4_0_, auditrecor0_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordVersionImpl: select auditrecor0_.ID as ID0_, auditrecor0_.VERSION as VERSION4_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_4_0_, auditrecor0_.OBJECT_ID as OBJECT4_4_0_, auditrecor0_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.audit.AuditRecordVersionImpl: select auditrecor0_.ID as ID0_, auditrecor0_.VERSION as VERSION4_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_4_0_, auditrecor0_.OBJECT_ID as OBJECT4_4_0_, auditrecor0_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.persistence.MyObject: select myobject0_.ID as ID0_, myobject0_.NAME as NAME5_0_, myobject0_.PROJECT_ID as PROJECT3_5_0_, myobject0_.FOO as FOO5_0_ from MY_OBJECT_TABLE myobject0_ where myobject0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.persistence.MyObject: select myobject0_.ID as ID0_, myobject0_.NAME as NAME5_0_, myobject0_.PROJECT_ID as PROJECT3_5_0_, myobject0_.FOO as FOO5_0_ from MY_OBJECT_TABLE myobject0_ where myobject0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.persistence.MyObject: select myobject0_.ID as ID0_, myobject0_.NAME as NAME5_0_, myobject0_.PROJECT_ID as PROJECT3_5_0_, myobject0_.FOO as FOO5_0_ from MY_OBJECT_TABLE myobject0_ where myobject0_.ID=?
DEBUG [main] EntityLoader - Static select for entity com.synygy.core.persistence.MyObject: select myobject0_.ID as ID0_, myobject0_.NAME as NAME5_0_, myobject0_.PROJECT_ID as PROJECT3_5_0_, myobject0_.FOO as FOO5_0_ from MY_OBJECT_TABLE myobject0_ where myobject0_.ID=?
DEBUG [main] SessionFactoryObjectFactory - registered: 8a8c948903d2aaab0103d2aabc5c0001 (unnamed)
INFO [main] SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
DEBUG [main] SessionFactoryImpl - instantiated session factory
INFO [main] Dialect - Using dialect: org.hibernate.dialect.HSQLDialect
DEBUG [main] AnnotationConfiguration - processing manytoone fk mappings
INFO [main] Configuration - processing extends queue
INFO [main] Configuration - processing collection mappings
INFO [main] Configuration - processing association property references
INFO [main] Configuration - processing foreign key constraints
DEBUG [main] AnnotationConfiguration - processing manytoone fk mappings
INFO [main] Configuration - processing extends queue
INFO [main] Configuration - processing collection mappings
INFO [main] Configuration - processing association property references
INFO [main] Configuration - processing foreign key constraints
INFO [main] SchemaExport - Running hbm2ddl schema export
INFO [main] SchemaExport - exporting generated schema to database
INFO [main] ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
DEBUG [main] SchemaExport - drop table AUDIT_RECORD if exists
DEBUG [main] SchemaExport - drop table AUDIT_RECORD_VERSION if exists
DEBUG [main] SchemaExport - drop table MY_OBJECT_TABLE if exists
DEBUG [main] SchemaExport - create table AUDIT_RECORD (
ID bigint generated by default as identity (start with 1),
effective timestamp not null,
OBJECT_CLASS varchar(255),
OBJECT_ID bigint,
USERNAME varchar(255),
VERSION bigint,
OPERATION integer,
primary key (ID)
)
DEBUG [main] SchemaExport - create table AUDIT_RECORD_VERSION (
ID bigint generated by default as identity (start with 1),
VERSION bigint not null,
OBJECT_CLASS varchar(255),
OBJECT_ID bigint,
AUDIT_RECORD_ID bigint,
primary key (ID)
)
DEBUG [main] SchemaExport - create table MY_OBJECT_TABLE (
ID bigint generated by default as identity (start with 1),
NAME varchar(255),
PROJECT_ID integer,
FOO varchar(255),
primary key (ID)
)
INFO [main] SchemaExport - schema export complete
INFO [main] SessionFactoryImpl - Checking 0 named queries
DEBUG [main] SessionImpl - opened session at timestamp: 4570853107687424
DEBUG [main] DefaultSaveOrUpdateEventListener - saving transient instance
DEBUG [main] AbstractSaveEventListener - generated identifier: , using strategy: org.hibernate.id.IdentityGenerator
DEBUG [main] AbstractSaveEventListener - saving [com.synygy.core.audit.AuditRecordImpl#<null>]
DEBUG [main] AbstractSaveEventListener - executing insertions
DEBUG [main] Versioning - Seeding: 2005-05-12 16:48:54.514
DEBUG [main] BasicEntityPersister - Inserting entity: com.synygy.core.audit.AuditRecordImpl (native id)
DEBUG [main] BasicEntityPersister - Version: 2005-05-12 16:48:54.514
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] AbstractBatcher - opening JDBC connection
DEBUG [main] SQL - insert into AUDIT_RECORD (effective, OBJECT_CLASS, OBJECT_ID, USERNAME, VERSION, OPERATION, ID) values (?, ?, ?, ?, ?, ?, null)
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordImpl#<null>]
DEBUG [main] TimestampType - binding '2005-05-12 16:48:54' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] StringType - binding 'unknown' to parameter: 4
DEBUG [main] LongType - binding null to parameter: 5
DEBUG [main] UserType - binding '0' to parameter: 6
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] IdentifierGeneratorFactory - Natively generated identity: 1
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] DefaultSaveOrUpdateEventListener - saving transient instance
DEBUG [main] AbstractSaveEventListener - generated identifier: , using strategy: org.hibernate.id.IdentityGenerator
DEBUG [main] AbstractSaveEventListener - saving [com.synygy.core.audit.AuditRecordVersionImpl#<null>]
DEBUG [main] AbstractSaveEventListener - executing insertions
DEBUG [main] Versioning - Seeding: 0
DEBUG [main] BasicEntityPersister - Inserting entity: com.synygy.core.audit.AuditRecordVersionImpl (native id)
DEBUG [main] BasicEntityPersister - Version: 0
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - insert into AUDIT_RECORD_VERSION (VERSION, OBJECT_CLASS, OBJECT_ID, AUDIT_RECORD_ID, ID) values (?, ?, ?, ?, null)
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordVersionImpl#<null>]
DEBUG [main] LongType - binding '0' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] LongType - binding '1' to parameter: 4
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] IdentifierGeneratorFactory - Natively generated identity: 1
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] DefaultSaveOrUpdateEventListener - ignoring persistent instance
DEBUG [main] DefaultSaveOrUpdateEventListener - object already associated with session: [com.synygy.core.audit.AuditRecordImpl#1]
DEBUG [main] AbstractFlushingEventListener - flushing session
DEBUG [main] AbstractFlushingEventListener - processing flush-time cascades
DEBUG [main] AbstractFlushingEventListener - dirty checking collections
DEBUG [main] AbstractFlushingEventListener - Flushing entities and processing referenced collections
DEBUG [main] BasicEntityPersister - com.synygy.core.audit.AuditRecordImpl.version is dirty
DEBUG [main] DefaultFlushEntityEventListener - Updating entity: [com.synygy.core.audit.AuditRecordImpl#1]
DEBUG [main] Versioning - Incrementing: 2005-05-12 16:48:54.514 to 2005-05-12 16:48:54.704
DEBUG [main] AbstractFlushingEventListener - Processing unreferenced collections
DEBUG [main] AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 insertions, 1 updates, 0 deletions to 2 objects
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG [main] Printer - listing entities:
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordVersionImpl{objectClass=com.synygy.core.persistence.MyObject, auditRecordId=1, objectId=1, id=1, version=0}
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordImpl{userName=unknown, objectClass=com.synygy.core.persistence.MyObject, effective=2005-05-12 16:48:54, objectId=1, operation=INSERT, id=1, version=0}
DEBUG [main] AbstractFlushingEventListener - executing flush
DEBUG [main] BasicEntityPersister - Updating entity: [com.synygy.core.audit.AuditRecordImpl#1]
DEBUG [main] BasicEntityPersister - Existing version: 2005-05-12 16:48:54.514 -> New version: 2005-05-12 16:48:54.704
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - update AUDIT_RECORD set effective=?, OBJECT_CLASS=?, OBJECT_ID=?, USERNAME=?, VERSION=?, OPERATION=? where ID=? and effective=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordImpl#1]
DEBUG [main] TimestampType - binding '2005-05-12 16:48:54' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] StringType - binding 'unknown' to parameter: 4
DEBUG [main] LongType - binding '0' to parameter: 5
DEBUG [main] UserType - binding '0' to parameter: 6
DEBUG [main] LongType - binding '1' to parameter: 7
DEBUG [main] TimestampType - binding '2005-05-12 16:48:54' to parameter: 8
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] AbstractFlushingEventListener - post flush
DEBUG [main] SessionImpl - closing session
DEBUG [main] AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
DEBUG [main] JDBCContext - after transaction completion
DEBUG [main] SessionImpl - after transaction completion
DEBUG [main] SessionImpl - opened session at timestamp: 4570853109161984
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] AbstractBatcher - opening JDBC connection
DEBUG [main] SQL - select this_.ID as ID0_, this_.VERSION as VERSION4_0_, this_.OBJECT_CLASS as OBJECT3_4_0_, this_.OBJECT_ID as OBJECT4_4_0_, this_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION this_ where this_.OBJECT_CLASS=? and this_.OBJECT_ID=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 1
DEBUG [main] LongType - binding '1' to parameter: 2
DEBUG [main] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG [main] Loader - processing result set
DEBUG [main] Loader - result set row: 0
DEBUG [main] LongType - returning '1' as column: ID0_
DEBUG [main] Loader - result row: EntityKey[com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] Loader - Initializing object from ResultSet: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] BasicEntityPersister - Hydrating entity: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] LongType - returning '0' as column: VERSION4_0_
DEBUG [main] StringType - returning 'com.synygy.core.persistence.MyObject' as column: OBJECT3_4_0_
DEBUG [main] LongType - returning '1' as column: OBJECT4_4_0_
DEBUG [main] LongType - returning '1' as column: AUDIT5_4_0_
DEBUG [main] TwoPhaseLoad - Version: 0
DEBUG [main] Loader - done processing result set (1 rows)
DEBUG [main] AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] Loader - total objects hydrated: 1
DEBUG [main] TwoPhaseLoad - resolving associations for [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] TwoPhaseLoad - done materializing entity [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] PersistenceContext - initializing non-lazy collections
DEBUG [main] DefaultSaveOrUpdateEventListener - saving transient instance
DEBUG [main] AbstractSaveEventListener - generated identifier: , using strategy: org.hibernate.id.IdentityGenerator
DEBUG [main] AbstractSaveEventListener - saving [com.synygy.core.audit.AuditRecordImpl#<null>]
DEBUG [main] AbstractSaveEventListener - executing insertions
DEBUG [main] Versioning - Seeding: 2005-05-12 16:48:54.964
DEBUG [main] BasicEntityPersister - Inserting entity: com.synygy.core.audit.AuditRecordImpl (native id)
DEBUG [main] BasicEntityPersister - Version: 2005-05-12 16:48:54.964
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - insert into AUDIT_RECORD (effective, OBJECT_CLASS, OBJECT_ID, USERNAME, VERSION, OPERATION, ID) values (?, ?, ?, ?, ?, ?, null)
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordImpl#<null>]
DEBUG [main] TimestampType - binding '2005-05-12 16:48:54' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] StringType - binding 'unknown' to parameter: 4
DEBUG [main] LongType - binding null to parameter: 5
DEBUG [main] UserType - binding '1' to parameter: 6
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - call identity()
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] IdentifierGeneratorFactory - Natively generated identity: 2
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] DefaultSaveOrUpdateEventListener - ignoring persistent instance
DEBUG [main] DefaultSaveOrUpdateEventListener - object already associated with session: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [Finalizer] JDBCContext - running Session.finalize()
DEBUG [main] AbstractFlushingEventListener - flushing session
DEBUG [main] AbstractFlushingEventListener - processing flush-time cascades
DEBUG [main] AbstractFlushingEventListener - dirty checking collections
DEBUG [main] AbstractFlushingEventListener - Flushing entities and processing referenced collections
DEBUG [main] BasicEntityPersister - com.synygy.core.audit.AuditRecordVersionImpl.auditRecordId is dirty
DEBUG [main] DefaultFlushEntityEventListener - Updating entity: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] Versioning - Incrementing: 0 to 1
DEBUG [main] AbstractFlushingEventListener - Processing unreferenced collections
DEBUG [main] AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 insertions, 1 updates, 0 deletions to 2 objects
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG [main] Printer - listing entities:
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordVersionImpl{objectClass=com.synygy.core.persistence.MyObject, auditRecordId=2, objectId=1, id=1, version=0}
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordImpl{userName=unknown, objectClass=com.synygy.core.persistence.MyObject, effective=2005-05-12 16:48:54, objectId=1, operation=UPDATE, id=2, version=null}
DEBUG [main] ActionQueue - changes must be flushed to space: AUDIT_RECORD_VERSION
DEBUG [main] DefaultAutoFlushEventListener - Need to execute flush
DEBUG [main] AbstractFlushingEventListener - executing flush
DEBUG [main] BasicEntityPersister - Updating entity: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] BasicEntityPersister - Existing version: 0 -> New version: 1
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - update AUDIT_RECORD_VERSION set VERSION=?, OBJECT_CLASS=?, OBJECT_ID=?, AUDIT_RECORD_ID=? where ID=? and VERSION=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] LongType - binding '1' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] LongType - binding '2' to parameter: 4
DEBUG [main] LongType - binding '1' to parameter: 5
DEBUG [main] LongType - binding '0' to parameter: 6
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] AbstractFlushingEventListener - post flush
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - select this_.ID as ID0_, this_.VERSION as VERSION4_0_, this_.OBJECT_CLASS as OBJECT3_4_0_, this_.OBJECT_ID as OBJECT4_4_0_, this_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION this_ where this_.OBJECT_CLASS=? and this_.OBJECT_ID=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 1
DEBUG [main] LongType - binding '1' to parameter: 2
DEBUG [main] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG [main] Loader - processing result set
DEBUG [main] Loader - result set row: 0
DEBUG [main] LongType - returning '1' as column: ID0_
DEBUG [main] Loader - result row: EntityKey[com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] Loader - done processing result set (1 rows)
DEBUG [main] AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] Loader - total objects hydrated: 0
DEBUG [main] PersistenceContext - initializing non-lazy collections
DEBUG [main] DefaultSaveOrUpdateEventListener - ignoring persistent instance
DEBUG [main] DefaultSaveOrUpdateEventListener - object already associated with session: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] AbstractFlushingEventListener - flushing session
DEBUG [main] AbstractFlushingEventListener - processing flush-time cascades
DEBUG [main] AbstractFlushingEventListener - dirty checking collections
DEBUG [main] AbstractFlushingEventListener - Flushing entities and processing referenced collections
DEBUG [main] BasicEntityPersister - com.synygy.core.audit.AuditRecordImpl.version is dirty
DEBUG [main] DefaultFlushEntityEventListener - Updating entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] Versioning - Incrementing: 2005-05-12 16:48:54.964 to 2005-05-12 16:49:17.778
DEBUG [main] AbstractFlushingEventListener - Processing unreferenced collections
DEBUG [main] AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 insertions, 1 updates, 0 deletions to 2 objects
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG [main] Printer - listing entities:
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordVersionImpl{objectClass=com.synygy.core.persistence.MyObject, auditRecordId=2, objectId=1, id=1, version=1}
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordImpl{userName=unknown, objectClass=com.synygy.core.persistence.MyObject, effective=2005-05-12 16:48:54, objectId=1, operation=UPDATE, id=2, version=1}
DEBUG [main] AbstractFlushingEventListener - executing flush
DEBUG [main] BasicEntityPersister - Updating entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] BasicEntityPersister - Existing version: 2005-05-12 16:48:54.964 -> New version: 2005-05-12 16:49:17.778
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - update AUDIT_RECORD set effective=?, OBJECT_CLASS=?, OBJECT_ID=?, USERNAME=?, VERSION=?, OPERATION=? where ID=? and effective=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] BasicEntityPersister - Dehydrating entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] TimestampType - binding '2005-05-12 16:49:17' to parameter: 1
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 2
DEBUG [main] LongType - binding '1' to parameter: 3
DEBUG [main] StringType - binding 'unknown' to parameter: 4
DEBUG [main] LongType - binding '1' to parameter: 5
DEBUG [main] UserType - binding '1' to parameter: 6
DEBUG [main] LongType - binding '2' to parameter: 7
DEBUG [main] TimestampType - binding '2005-05-12 16:48:54' to parameter: 8
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] AbstractFlushingEventListener - post flush
DEBUG [main] SessionImpl - closing session
DEBUG [main] AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
DEBUG [main] JDBCContext - after transaction completion
DEBUG [main] SessionImpl - after transaction completion
DEBUG [main] SessionImpl - opened session at timestamp: 4570853203468288
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] AbstractBatcher - opening JDBC connection
DEBUG [main] SQL - select this_.ID as ID0_, this_.VERSION as VERSION4_0_, this_.OBJECT_CLASS as OBJECT3_4_0_, this_.OBJECT_ID as OBJECT4_4_0_, this_.AUDIT_RECORD_ID as AUDIT5_4_0_ from AUDIT_RECORD_VERSION this_ where this_.OBJECT_CLASS=? and this_.OBJECT_ID=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] StringType - binding 'com.synygy.core.persistence.MyObject' to parameter: 1
DEBUG [main] LongType - binding '1' to parameter: 2
DEBUG [main] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG [main] Loader - processing result set
DEBUG [main] Loader - result set row: 0
DEBUG [main] LongType - returning '1' as column: ID0_
DEBUG [main] Loader - result row: EntityKey[com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] Loader - Initializing object from ResultSet: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] BasicEntityPersister - Hydrating entity: [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] LongType - returning '1' as column: VERSION4_0_
DEBUG [main] StringType - returning 'com.synygy.core.persistence.MyObject' as column: OBJECT3_4_0_
DEBUG [main] LongType - returning '1' as column: OBJECT4_4_0_
DEBUG [main] LongType - returning '2' as column: AUDIT5_4_0_
DEBUG [main] TwoPhaseLoad - Version: 1
DEBUG [main] Loader - done processing result set (1 rows)
DEBUG [main] AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] Loader - total objects hydrated: 1
DEBUG [main] TwoPhaseLoad - resolving associations for [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] TwoPhaseLoad - done materializing entity [com.synygy.core.audit.AuditRecordVersionImpl#1]
DEBUG [main] PersistenceContext - initializing non-lazy collections
DEBUG [main] DefaultLoadEventListener - loading entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] DefaultLoadEventListener - attempting to resolve: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] DefaultLoadEventListener - object not resolved in any cache: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] BasicEntityPersister - Materializing entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] Loader - loading entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] SQL - select auditrecor0_.ID as ID0_, auditrecor0_.effective as effective3_0_, auditrecor0_.OBJECT_CLASS as OBJECT3_3_0_, auditrecor0_.OBJECT_ID as OBJECT4_3_0_, auditrecor0_.USERNAME as USERNAME3_0_, auditrecor0_.VERSION as VERSION3_0_, auditrecor0_.OPERATION as OPERATION3_0_ from AUDIT_RECORD auditrecor0_ where auditrecor0_.ID=?
DEBUG [main] AbstractBatcher - preparing statement
DEBUG [main] LongType - binding '2' to parameter: 1
DEBUG [main] AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG [main] Loader - processing result set
DEBUG [main] Loader - result set row: 0
DEBUG [main] Loader - result row: EntityKey[com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] Loader - Initializing object from ResultSet: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] BasicEntityPersister - Hydrating entity: [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] TimestampType - returning '2005-05-12 16:49:17' as column: effective3_0_
DEBUG [main] StringType - returning 'com.synygy.core.persistence.MyObject' as column: OBJECT3_3_0_
DEBUG [main] LongType - returning '1' as column: OBJECT4_3_0_
DEBUG [main] StringType - returning 'unknown' as column: USERNAME3_0_
DEBUG [main] LongType - returning '1' as column: VERSION3_0_
DEBUG [main] UserType - returning '1' as column: OPERATION3_0_
DEBUG [main] TwoPhaseLoad - Version: 2005-05-12 16:49:17.778
DEBUG [main] Loader - done processing result set (1 rows)
DEBUG [main] AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG [main] AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [main] AbstractBatcher - closing statement
DEBUG [main] Loader - total objects hydrated: 1
DEBUG [main] TwoPhaseLoad - resolving associations for [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] TwoPhaseLoad - done materializing entity [com.synygy.core.audit.AuditRecordImpl#2]
DEBUG [main] PersistenceContext - initializing non-lazy collections
DEBUG [main] Loader - done entity load
DEBUG [main] AbstractFlushingEventListener - flushing session
DEBUG [main] AbstractFlushingEventListener - processing flush-time cascades
DEBUG [main] AbstractFlushingEventListener - dirty checking collections
DEBUG [main] AbstractFlushingEventListener - Flushing entities and processing referenced collections
DEBUG [main] AbstractFlushingEventListener - Processing unreferenced collections
DEBUG [main] AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 2 objects
DEBUG [main] AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG [main] Printer - listing entities:
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordVersionImpl{objectClass=com.synygy.core.persistence.MyObject, auditRecordId=2, objectId=1, id=1, version=1}
DEBUG [main] Printer - com.synygy.core.audit.AuditRecordImpl{userName=unknown, objectClass=com.synygy.core.persistence.MyObject, effective=2005-05-12 16:49:17, objectId=1, operation=UPDATE, id=2, version=1}
DEBUG [main] AbstractFlushingEventListener - executing flush
DEBUG [main] AbstractFlushingEventListener - post flush
DEBUG [main] SessionImpl - closing session
DEBUG [main] AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
DEBUG [main] JDBCContext - after transaction completion
DEBUG [main] SessionImpl - after transaction completion
[/code]