-->
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.  [ 3 posts ] 
Author Message
 Post subject: dynamic-update does not seem to work for composite-id
PostPosted: Tue Feb 24, 2004 5:52 am 
Newbie

Joined: Tue Feb 24, 2004 5:45 am
Posts: 2
I'm using a legacy database , where the primary keys are not simple integers or numbers but consisting op to 5 fields.
Furthermore this is an oracle database where there is trigger auditing happenning.
In the triggers there is an oracle function used(UPDATING) which can detect there is an update on the field , but not if the field value actually changed.
Since i update all columns with hibernate, i see way too many records in the auditing which should'nt be there.

I'm using hibernate 2.1 ,oracle9i v2

my mappings and java files follows.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>

<class name="test.Invoice" table="V_INV_INVOICE_HEDS" dynamic-update="true" dynamic-insert="true" select-before-update="true" optimistic-lock="version">
<composite-id class = "test.ExtTransactionKeyImpl" name = "id" unsaved-value = "none">
<key-property name="localSystemCode" column="LOC_SYS_CD"/>
<key-property name="transAreaCode" column="TRANS_AREA_CD"/>
<key-property name="transTypeCode" column="TRANS_TP_CD"/>
<key-property name="localObjectId" column="INV_HED_ID"/>
<key-property name="localObjectForeignId" column="LOC_OBJ_FOREIGN_ID"/>
</composite-id>

<component class="test.InvoiceHeader" name="invoiceHeader">
<property name="title" column="TITLE"/>

<component class="test.ShortTransactionKeyImpl" name="thirdPartyKey">
<property name="localObjectId" column="THIRD_PARTY_ID"/>
<property name="localSystemCode" column="THIRD_PARTY_LOC_SYS_CD"/>
</component>

<property name="beneficiary" column="BENEFICIARY"/>
<property name="invoiceCurrencyCode" column="INV_CURRENCY_CD"/>
<property name="vatCountryIso2Code" column="VAT_CTY_ISO2_CD"/>

<property name="responsibleUser" column="RESPONSIBLE_USR"/>
<property name="remarks" column="REMARKS"/>
<property name="completeFlag" column="COMPLETE_FLG"/>
<property name="invoiceTypeCode" column="INV_TP_CD"/>
<property name="reasonCompleteFlag" column="REASON_COMPLETE_FLG"/>

<component class="test.PaymentDelay" name="paymentDelay">
<property name="maximumPaymentDelayClass" column="MAX_PAY_DELAY_CLASS"/>
<property name="paymentDelayInDays" column="SPECIFIC_PAY_DELAY"/>
</component>

</component>
</class>


</hibernate-mapping>


// in first transaction
tx = sess.beginTransaction();

IShortTransactionKey thpKey = new ShortTransactionKeyImpl("SI1",new Long(820866));

InvoiceHeader invheader = new InvoiceHeader("HIBERNATE_TITLE",thpKey,null,"EUR","DE","XHIBERNATE_RESPONSIBLE_USER","XHIBERNATE_REMARKS","N","NI",null,new PaymentDelay("60"));
IExtTransactionKey invoiceKey = new ExtTransactionKeyImpl("SI2","INV","INH",new Long(888888888));

Invoice invoice = new Invoice(invoiceKey,invheader);


sess.save(invoice);
tx.commit();


// in second transaction
tx = sess.beginTransaction();

invoice = (Invoice) sess.load(Invoice.class,invoiceKey);
invoice.getInvoiceHeader().setBeneficiary("NEW_HIBERNATE_BENEF");
sess.update(invoice);

tx.commit();


if anybody can tell what to do please e-mail to this forum
or at BUDG-DEV-CONSULTANT1@cec.eu.int


Top
 Profile  
 
 Post subject: Re: dynamic-update does not seem to work for composite-id
PostPosted: Tue Feb 24, 2004 5:54 am 
Newbie

Joined: Tue Feb 24, 2004 5:45 am
Posts: 2
[quote="blyaugi"]I'm using a legacy database , where the primary keys are not simple integers or numbers but consisting op to 5 fields.
Furthermore this is an oracle database where there is trigger auditing happenning.
In the triggers there is an oracle function used(UPDATING) which can detect there is an update on the field , but not if the field value actually changed.
Since i update all columns with hibernate, i see way too many records in the auditing which should'nt be there.

I'm using hibernate 2.1 ,oracle9i v2

my mappings and java files follows.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>

<class name="test.Invoice" table="V_INV_INVOICE_HEDS" dynamic-update="true" dynamic-insert="true" select-before-update="true" optimistic-lock="version">
<composite-id class = "test.ExtTransactionKeyImpl" name = "id" unsaved-value = "none">
<key-property name="localSystemCode" column="LOC_SYS_CD"/>
<key-property name="transAreaCode" column="TRANS_AREA_CD"/>
<key-property name="transTypeCode" column="TRANS_TP_CD"/>
<key-property name="localObjectId" column="INV_HED_ID"/>
<key-property name="localObjectForeignId" column="LOC_OBJ_FOREIGN_ID"/>
</composite-id>

<component class="test.InvoiceHeader" name="invoiceHeader">
<property name="title" column="TITLE"/>

<component class="test.ShortTransactionKeyImpl" name="thirdPartyKey">
<property name="localObjectId" column="THIRD_PARTY_ID"/>
<property name="localSystemCode" column="THIRD_PARTY_LOC_SYS_CD"/>
</component>

<property name="beneficiary" column="BENEFICIARY"/>
<property name="invoiceCurrencyCode" column="INV_CURRENCY_CD"/>
<property name="vatCountryIso2Code" column="VAT_CTY_ISO2_CD"/>

<property name="responsibleUser" column="RESPONSIBLE_USR"/>
<property name="remarks" column="REMARKS"/>
<property name="completeFlag" column="COMPLETE_FLG"/>
<property name="invoiceTypeCode" column="INV_TP_CD"/>
<property name="reasonCompleteFlag" column="REASON_COMPLETE_FLG"/>

<component class="test.PaymentDelay" name="paymentDelay">
<property name="maximumPaymentDelayClass" column="MAX_PAY_DELAY_CLASS"/>
<property name="paymentDelayInDays" column="SPECIFIC_PAY_DELAY"/>
</component>

</component>
</class>


</hibernate-mapping>


// in first transaction
tx = sess.beginTransaction();

IShortTransactionKey thpKey = new ShortTransactionKeyImpl("SI1",new Long(820866));

InvoiceHeader invheader = new InvoiceHeader("HIBERNATE_TITLE",thpKey,null,"EUR","DE","XHIBERNATE_RESPONSIBLE_USER","XHIBERNATE_REMARKS","N","NI",null,new PaymentDelay("60"));
IExtTransactionKey invoiceKey = new ExtTransactionKeyImpl("SI2","INV","INH",new Long(888888888));

Invoice invoice = new Invoice(invoiceKey,invheader);


sess.save(invoice);
tx.commit();


// in second transaction
tx = sess.beginTransaction();

invoice = (Invoice) sess.load(Invoice.class,invoiceKey);
invoice.getInvoiceHeader().setBeneficiary("NEW_HIBERNATE_BENEF");
sess.update(invoice);

tx.commit();


if anybody can tell what to do please e-mail to this forum
or at BUDG-DEV-CONSULTANT1@cec.eu.int

i forgot to include hibernate trace messages
starting program TestMapping
0 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.2
30 [main] INFO net.sf.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.default_schema=SI2, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.connection.username=blyaugi, hibernate.connection.url=jdbc:oracle:thin:@miles-h41.cc.cec.eu.int:1521:SI2B, hibernate.show_sql=true, hibernate.connection.password=Jan2004, hibernate.connection.pool_size=1}
50 [main] INFO net.sf.hibernate.cfg.Environment - using java.io streams to persist binary types
50 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer
70 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping file: ClassMappings.hbm.xml
250 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
280 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
621 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class: test.Invoice -> V_INV_INVOICE_HEDS
871 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: localSystemCode -> LOC_SYS_CD, type: string
881 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: transAreaCode -> TRANS_AREA_CD, type: string
881 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: transTypeCode -> TRANS_TP_CD, type: string
881 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: localObjectId -> INV_HED_ID, type: long
881 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: localObjectForeignId -> LOC_OBJ_FOREIGN_ID, type: string
1352 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id -> LOC_SYS_CD, TRANS_AREA_CD, TRANS_TP_CD, INV_HED_ID, LOC_OBJ_FOREIGN_ID, type: test.ExtTransactionKeyImpl
1362 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: title -> TITLE, type: string
1362 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: localObjectId -> THIRD_PARTY_ID, type: long
1362 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: localSystemCode -> THIRD_PARTY_LOC_SYS_CD, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: thirdPartyKey -> THIRD_PARTY_ID, THIRD_PARTY_LOC_SYS_CD, type: test.ShortTransactionKeyImpl
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: beneficiary -> BENEFICIARY, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: invoiceCurrencyCode -> INV_CURRENCY_CD, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: vatCountryIso2Code -> VAT_CTY_ISO2_CD, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: responsibleUser -> RESPONSIBLE_USR, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: remarks -> REMARKS, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: completeFlag -> COMPLETE_FLG, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: invoiceTypeCode -> INV_TP_CD, type: string
1412 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: reasonCompleteFlag -> REASON_COMPLETE_FLG, type: string
1432 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: maximumPaymentDelayClass -> MAX_PAY_DELAY_CLASS, type: string
1432 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: paymentDelayInDays -> SPECIFIC_PAY_DELAY, type: long
1472 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: paymentDelay -> MAX_PAY_DELAY_CLASS, SPECIFIC_PAY_DELAY, type: test.PaymentDelay
1532 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: invoiceHeader -> TITLE, THIRD_PARTY_ID, THIRD_PARTY_LOC_SYS_CD, BENEFICIARY, INV_CURRENCY_CD, VAT_CTY_ISO2_CD, RESPONSIBLE_USR, REMARKS, COMPLETE_FLG, INV_TP_CD, REASON_COMPLETE_FLG, MAX_PAY_DELAY_CLASS, SPECIFIC_PAY_DELAY, type: test.InvoiceHeader
1532 [main] INFO net.sf.hibernate.cfg.Configuration - processing one-to-many association mappings
1532 [main] INFO net.sf.hibernate.cfg.Configuration - processing one-to-one association property references
1532 [main] INFO net.sf.hibernate.cfg.Configuration - processing foreign key constraints
1592 [main] INFO net.sf.hibernate.dialect.Dialect - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
1592 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Maximim outer join fetch depth: 1
1592 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use outer join fetching: true
1612 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
1612 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 1
1822 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@miles-h41.cc.cec.eu.int:1521:SI2B
1822 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=blyaugi, password=Jan2004}
1862 [main] INFO net.sf.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
1862 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
1862 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
3174 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:oracle:thin:@miles-h41.cc.cec.eu.int:1521:SI2B, Isolation Level: 2
3234 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use scrollable result sets: true
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use JDBC3 getGeneratedKeys(): false
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: false
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Default schema set to: SI2
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - echoing all SQL to stdout
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Query language substitutions: {no='N', true=1, yes='Y', false=0}
3234 [main] INFO net.sf.hibernate.cfg.SettingsFactory - cache provider: net.sf.hibernate.cache.HashtableCacheProvider
3234 [main] INFO net.sf.hibernate.cfg.Configuration - instantiating and configuring caches
3374 [main] INFO net.sf.hibernate.impl.SessionFactoryImpl - building session factory
3374 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=Jan2004, hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider, sun.boot.library.path=C:\Program Files\Java\j2re1.4.2\bin, hibernate.default_schema=SI2, java.vm.version=1.4.2-b28, hibernate.connection.username=blyaugi, 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=BE, sun.os.patch.level=Service Pack 1, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\java\projects\test_hibernate, java.runtime.version=1.4.2-b28, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\j2re1.4.2\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\BUDG-D~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\WINDOWS\system32;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\system32\drivers\etc;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ORADI\BIN;C:\PROGRA~1\ORACLE\BIN;C:\program Files\Common Files\PowerSoft Shared;D:\java\tools\jakarta-ant-1.5\bin;"C:\Program Files\WinZip\WINZIP32.EXE";D:\java\j2sdk1.4.2\bin;C:\PROGRA~1\ULTRAE~1;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.connection.pool_size=1, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\Budg-DevlP01, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, java.class.path=.;D:\java\tools\hibernate-2.1\hibernate2.jar;D:\java\tools\hibernate-2.1\lib\dom4j-1.4.jar;D:\java\tools\hibernate-2.1\lib\commons-logging-1.0.3.jar;D:\java\tools\hibernate-2.1\lib\commons-collections-2.1.jar;D:\java\tools\hibernate-2.1\lib\commons-lang-1.0.1.jar;D:\java\tools\hibernate-2.1\lib\log4j-1.2.8.jar;D:\java\tools\hibernate-2.1\lib\cglib-2.0-rc2.jar;D:\java\tools\hibernate-2.1\lib\jta.jar;D:\java\libraries\jdbc\oracle9\classes12.zip, user.name=Budg-DevlP01, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\j2re1.4.2, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@miles-h41.cc.cec.eu.int:1521:SI2B, user.language=fr, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, hibernate.jdbc.use_streams_for_binary=true, java.version=1.4.2, java.ext.dirs=C:\Program Files\Java\j2re1.4.2\lib\ext, sun.boot.class.path=C:\Program Files\Java\j2re1.4.2\lib\rt.jar;C:\Program Files\Java\j2re1.4.2\lib\i18n.jar;C:\Program Files\Java\j2re1.4.2\lib\sunrsasign.jar;C:\Program Files\Java\j2re1.4.2\lib\jsse.jar;C:\Program Files\Java\j2re1.4.2\lib\jce.jar;C:\Program Files\Java\j2re1.4.2\lib\charsets.jar;C:\Program Files\Java\j2re1.4.2\classes, java.vendor=Sun Microsystems Inc., hibernate.jdbc.batch_size=0, file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, hibernate.max_fetch_depth=1, sun.cpu.isalist=pentium i486 i386}
3905 [main] DEBUG net.sf.hibernate.impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
3915 [main] DEBUG net.sf.hibernate.impl.SessionFactoryObjectFactory - registered: 1e26ad04fae6e21300fae6e215e10000 (unnamed)
3915 [main] INFO net.sf.hibernate.impl.SessionFactoryObjectFactory - no JNDI name configured
3915 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - instantiated session factory
4025 [main] DEBUG net.sf.hibernate.impl.SessionImpl - opened session
4025 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - begin
4025 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
4025 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
4025 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - current autocommit status:false
4035 [main] DEBUG net.sf.hibernate.impl.SessionImpl - generated identifier: test.ExtTransactionKeyImpl@34fb5e38
4035 [main] DEBUG net.sf.hibernate.impl.SessionImpl - saving [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4065 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - commit
4065 [main] DEBUG net.sf.hibernate.impl.SessionImpl - flushing session
4065 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushing entities and processing referenced collections
4075 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Processing unreferenced collections
4075 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Scheduling collection removes/(re)creates/updates
4075 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
4075 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
4075 [main] DEBUG net.sf.hibernate.impl.Printer - listing entities:
4075 [main] DEBUG net.sf.hibernate.impl.Printer - test.Invoice{invoiceHeader=InvoiceHeader{paymentDelay=PaymentDelay{maximumPaymentDelayClass=60, paymentDelayInDays=null}, responsibleUser=XHIBERNATE_RESPONSIBLE_USER, vatCountryIso2Code=DE, title=HIBERNATE_TITLE, remarks=XHIBERNATE_REMARKS, beneficiary=null, invoiceCurrencyCode=EUR, invoiceTypeCode=NI, reasonCompleteFlag=null, completeFlag=N, thirdPartyKey=ShortTransactionKeyImpl{localObjectId=820866, localSystemCode=SI1}}, id=ExtTransactionKeyImpl{transTypeCode=INH, localObjectForeignId=SI2.888888888, localObjectId=888888888, localSystemCode=SI2, transAreaCode=INV}}
4075 [main] DEBUG net.sf.hibernate.impl.SessionImpl - executing flush
4075 [main] DEBUG net.sf.hibernate.persister.EntityPersister - Inserting entity: [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4075 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
4075 [main] DEBUG net.sf.hibernate.SQL - insert into SI2.V_INV_INVOICE_HEDS (TITLE, THIRD_PARTY_ID, THIRD_PARTY_LOC_SYS_CD, BENEFICIARY, INV_CURRENCY_CD, VAT_CTY_ISO2_CD, RESPONSIBLE_USR, REMARKS, COMPLETE_FLG, INV_TP_CD, REASON_COMPLETE_FLG, MAX_PAY_DELAY_CLASS, SPECIFIC_PAY_DELAY, LOC_SYS_CD, TRANS_AREA_CD, TRANS_TP_CD, INV_HED_ID, LOC_OBJ_FOREIGN_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into SI2.V_INV_INVOICE_HEDS (TITLE, THIRD_PARTY_ID, THIRD_PARTY_LOC_SYS_CD, BENEFICIARY, INV_CURRENCY_CD, VAT_CTY_ISO2_CD, RESPONSIBLE_USR, REMARKS, COMPLETE_FLG, INV_TP_CD, REASON_COMPLETE_FLG, MAX_PAY_DELAY_CLASS, SPECIFIC_PAY_DELAY, LOC_SYS_CD, TRANS_AREA_CD, TRANS_TP_CD, INV_HED_ID, LOC_OBJ_FOREIGN_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
4075 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
4165 [main] DEBUG net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4165 [main] DEBUG net.sf.hibernate.type.StringType - binding 'HIBERNATE_TITLE' to parameter: 1
4165 [main] DEBUG net.sf.hibernate.type.LongType - binding '820866' to parameter: 2
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI1' to parameter: 3
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding null to parameter: 4
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'EUR' to parameter: 5
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'DE' to parameter: 6
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'XHIBERNATE_RESPONSIBLE_USER' to parameter: 7
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'XHIBERNATE_REMARKS' to parameter: 8
4225 [main] DEBUG net.sf.hibernate.type.StringType - binding 'N' to parameter: 9
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding 'NI' to parameter: 10
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding null to parameter: 11
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding '60' to parameter: 12
4235 [main] DEBUG net.sf.hibernate.type.LongType - binding null to parameter: 13
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI2' to parameter: 14
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding 'INV' to parameter: 15
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding 'INH' to parameter: 16
4235 [main] DEBUG net.sf.hibernate.type.LongType - binding '888888888' to parameter: 17
4235 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI2.888888888' to parameter: 18
4425 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
4425 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
4425 [main] DEBUG net.sf.hibernate.impl.SessionImpl - post flush
4435 [main] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion
4445 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - begin
4445 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - current autocommit status:false
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - loading [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - attempting to resolve [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - resolved object in session cache [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - object already associated with session
4445 [main] DEBUG net.sf.hibernate.transaction.JDBCTransaction - commit
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - flushing session
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushing entities and processing referenced collections
4445 [main] DEBUG net.sf.hibernate.persister.AbstractEntityPersister - test.Invoice.invoiceHeader is dirty
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Updating entity: [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Processing unreferenced collections
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Scheduling collection removes/(re)creates/updates
4445 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
4455 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
4455 [main] DEBUG net.sf.hibernate.impl.Printer - listing entities:
4455 [main] DEBUG net.sf.hibernate.impl.Printer - test.Invoice{invoiceHeader=InvoiceHeader{paymentDelay=PaymentDelay{maximumPaymentDelayClass=60, paymentDelayInDays=null}, responsibleUser=XHIBERNATE_RESPONSIBLE_USER, vatCountryIso2Code=DE, title=HIBERNATE_TITLE, remarks=XHIBERNATE_REMARKS, beneficiary=NEW_HIBERNATE_BENEF, invoiceCurrencyCode=EUR, invoiceTypeCode=NI, reasonCompleteFlag=null, completeFlag=N, thirdPartyKey=ShortTransactionKeyImpl{localObjectId=820866, localSystemCode=SI1}}, id=ExtTransactionKeyImpl{transTypeCode=INH, localObjectForeignId=SI2.888888888, localObjectId=888888888, localSystemCode=SI2, transAreaCode=INV}}
4455 [main] DEBUG net.sf.hibernate.impl.SessionImpl - executing flush
4455 [main] DEBUG net.sf.hibernate.persister.EntityPersister - Updating entity: [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4455 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
4455 [main] DEBUG net.sf.hibernate.SQL - update SI2.V_INV_INVOICE_HEDS set TITLE=?, THIRD_PARTY_ID=?, THIRD_PARTY_LOC_SYS_CD=?, BENEFICIARY=?, INV_CURRENCY_CD=?, VAT_CTY_ISO2_CD=?, RESPONSIBLE_USR=?, REMARKS=?, COMPLETE_FLG=?, INV_TP_CD=?, REASON_COMPLETE_FLG=?, MAX_PAY_DELAY_CLASS=?, SPECIFIC_PAY_DELAY=? where LOC_SYS_CD=? and TRANS_AREA_CD=? and TRANS_TP_CD=? and INV_HED_ID=? and LOC_OBJ_FOREIGN_ID=?
Hibernate: update SI2.V_INV_INVOICE_HEDS set TITLE=?, THIRD_PARTY_ID=?, THIRD_PARTY_LOC_SYS_CD=?, BENEFICIARY=?, INV_CURRENCY_CD=?, VAT_CTY_ISO2_CD=?, RESPONSIBLE_USR=?, REMARKS=?, COMPLETE_FLG=?, INV_TP_CD=?, REASON_COMPLETE_FLG=?, MAX_PAY_DELAY_CLASS=?, SPECIFIC_PAY_DELAY=? where LOC_SYS_CD=? and TRANS_AREA_CD=? and TRANS_TP_CD=? and INV_HED_ID=? and LOC_OBJ_FOREIGN_ID=?
4455 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
4465 [main] DEBUG net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [test.Invoice#test.ExtTransactionKeyImpl@34fb5e38]
4465 [main] DEBUG net.sf.hibernate.type.StringType - binding 'HIBERNATE_TITLE' to parameter: 1
4465 [main] DEBUG net.sf.hibernate.type.LongType - binding '820866' to parameter: 2
4465 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI1' to parameter: 3
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'NEW_HIBERNATE_BENEF' to parameter: 4
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'EUR' to parameter: 5
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'DE' to parameter: 6
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'XHIBERNATE_RESPONSIBLE_USER' to parameter: 7
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'XHIBERNATE_REMARKS' to parameter: 8
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'N' to parameter: 9
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'NI' to parameter: 10
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding null to parameter: 11
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding '60' to parameter: 12
4475 [main] DEBUG net.sf.hibernate.type.LongType - binding null to parameter: 13
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI2' to parameter: 14
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'INV' to parameter: 15
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'INH' to parameter: 16
4475 [main] DEBUG net.sf.hibernate.type.LongType - binding '888888888' to parameter: 17
4475 [main] DEBUG net.sf.hibernate.type.StringType - binding 'SI2.888888888' to parameter: 18
4676 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
4676 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
4686 [main] DEBUG net.sf.hibernate.impl.SessionImpl - post flush
4696 [main] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion
4696 [main] DEBUG net.sf.hibernate.impl.SessionImpl - closing session
4696 [main] DEBUG net.sf.hibernate.impl.SessionImpl - disconnecting session
4706 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
4706 [main] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 12:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
dynamic-update does not apply to components, only "toplevel" properties. (BTW, you do NOT need to call session.update(), Hibernate implements automatic dirty checking.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.