I have a unidirectional many-to-many with cascade="save-update". When I create a new transient parent, and attach a transient item to the Set (many-to-many) and call save(), I get TWO inserts for child entities (into the join table). The first insert is OK, and contains both the parent and child ID's. The second insert contains the parent ID, but no child ID, hence the ORA-01400: cannot insert NULL jazz. I'm totally stumped here.
I have snipped out some verbose portions of my mapping docs.
Hibernate version:
2.1.8
Mapping documents:
Code:
<hibernate-mapping>
<class name="com.comerxia.core.model.Account" table="ACCOUNT"
dynamic-update="false" dynamic-insert="false"
select-before-update="false" optimistic-lock="version">
<id name="id" column="ID" type="java.lang.Long">
<generator class="sequence">
<param name="sequence">ACCOUNT_SEQ</param>
</generator>
</id>
<set name="addresses" table="LINKACCOUNTADDRESS" lazy="false"
inverse="false" cascade="save-update" sort="unsorted">
<key column="ACCOUNTID" foreign-key="LAA_ACCOUNTID_FK">
</key>
<many-to-many class="com.comerxia.core.model.Address"
column="ADDRESSID" outer-join="auto" foreign-key="LAA_ADDRESSID_FK" />
</set>
</class>
</hibernate-mapping>
Code:
<hibernate-mapping>
<class name="com.comerxia.core.model.Address" table="ADDRESS"
lazy="true" dynamic-update="false" dynamic-insert="false"
select-before-update="false" optimistic-lock="version"
discriminator-value="null">
<id name="id" column="ID" type="java.lang.Long">
<generator class="sequence">
<param name="sequence">ADDRESS_SEQ</param>
</generator>
</id>
<discriminator column="TYPE" />
<property name="description" type="java.lang.String"
update="true" insert="true" access="property" column="DESCRIPTION"
length="50" not-null="true" />
<many-to-one name="country"
class="com.comerxia.core.model.Country" cascade="none"
outer-join="auto" update="true" insert="true" access="property"
foreign-key="ADDRESS_COUNTRYCODE_FK" column="COUNTRYCODE" />
<property name="dateCreated" type="java.util.Date" update="true"
insert="true" access="property" column="DATECREATED" />
<subclass name="com.comerxia.core.model.WarehouseAddress"
dynamic-update="false" dynamic-insert="false" lazy="true"
discriminator-value="WAREHOUSE">
<property name="code" type="java.lang.String" update="true"
insert="true" access="property" column="CODE" unique="true" />
</subclass>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():I'm using Spring with declarative transaction demarcation and what
acts like OpenSessionInViewFilter (actually it is a base Spring JUnit test case that works the same way).
Code:
return (Long) getHibernateTemplate().save(bean);
Full stack trace of any exception that occurs:See below...
Name and version of the database you are using:Oracle 8i
The generated SQL (show_sql=true):Code:
Hibernate: select ACCOUNT_SEQ.nextval from dual
Hibernate: select ADDRESS_SEQ.nextval from dual
Hibernate: insert into CORE.ACCOUNT (ENABLEDFLAG, EMAILADDRESS, FIRSTNAME, MIDDLENAME, LASTNAME, GENERATEDEMAILADDRESS, GOSHOPPINGREGID, LOCALECODE, MALLID, MERCHANTID, MERCHANTCUSTOMERID, PASSWORD, PASSWORDHINTANSWER, PASSWORDHINTQUESTION, BILLTOADDRESSID, SHIPTOADDRESSID, SUBSCRIBEDFLAG, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into CORE.ADDRESS (DESCRIPTION, CITY, FIRSTNAME, LASTNAME, MIDDLENAME, PHONE, STATE, STREET1, STREET2, POSTALCODE, NATIONALID, COUNTRYCODE, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
Hibernate: insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
Debug level Hibernate log excerpt:Code:
2005-05-12 16:57:18,562 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:204) - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:18,577 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - select ACCOUNT_SEQ.nextval from dual
Hibernate: select ACCOUNT_SEQ.nextval from dual
2005-05-12 16:57:18,577 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:253) - preparing statement
2005-05-12 16:57:18,593 DEBUG [main] id.SequenceGenerator (SequenceGenerator.java:76) - Sequence identifier generated: 708
2005-05-12 16:57:18,593 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:211) - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:18,608 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:275) - closing statement
2005-05-12 16:57:18,608 DEBUG [main] impl.SessionImpl (SessionImpl.java:789) - generated identifier: 708
2005-05-12 16:57:18,608 DEBUG [main] impl.SessionImpl (SessionImpl.java:836) - saving [com.comerxia.core.model.Account#708]
2005-05-12 16:57:18,624 DEBUG [main] engine.Cascades (Cascades.java:497) - processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:18,640 DEBUG [main] engine.Cascades (Cascades.java:506) - done processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:18,640 DEBUG [main] impl.WrapVisitor (WrapVisitor.java:81) - Wrapped collection in role: com.comerxia.core.model.Account.addresses
2005-05-12 16:57:18,655 DEBUG [main] engine.Cascades (Cascades.java:497) - processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:18,655 DEBUG [main] engine.Cascades (Cascades.java:524) - cascading to collection: com.comerxia.core.model.Account.addresses
2005-05-12 16:57:18,671 DEBUG [main] engine.Cascades$4 (Cascades.java:113) - cascading to saveOrUpdate()
2005-05-12 16:57:18,671 DEBUG [main] impl.SessionImpl (SessionImpl.java:1397) - saveOrUpdate() unsaved instance
2005-05-12 16:57:18,687 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:204) - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:18,687 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - select ADDRESS_SEQ.nextval from dual
Hibernate: select ADDRESS_SEQ.nextval from dual
2005-05-12 16:57:18,702 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:253) - preparing statement
2005-05-12 16:57:18,718 DEBUG [main] id.SequenceGenerator (SequenceGenerator.java:76) - Sequence identifier generated: 2678
2005-05-12 16:57:18,733 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:211) - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:18,733 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:275) - closing statement
2005-05-12 16:57:18,749 DEBUG [main] impl.SessionImpl (SessionImpl.java:789) - generated identifier: 2678
2005-05-12 16:57:18,749 DEBUG [main] impl.SessionImpl (SessionImpl.java:836) - saving [com.comerxia.core.model.Address#2678]
2005-05-12 16:57:18,765 DEBUG [main] engine.Cascades (Cascades.java:506) - done processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:18,765 DEBUG [main] support.TransactionSynchronizationManager (TransactionSynchronizationManager.java:127) - Retrieved value [org.springframework.orm.hibernate.SessionHolder@6dd8e1] for key [net.sf.hibernate.impl.SessionFactoryImpl@1c0cb76] bound to thread [main]
2005-05-12 16:57:22,218 DEBUG [main] interceptor.TransactionAspectSupport (TransactionAspectSupport.java:241) - Invoking commit for transaction on method 'createAccount' in class [com.comerxia.core.logic.AccountManager]
2005-05-12 16:57:22,218 DEBUG [main] support.AbstractPlatformTransactionManager (AbstractPlatformTransactionManager.java:523) - Triggering beforeCommit synchronization
2005-05-12 16:57:22,233 DEBUG [main] support.AbstractPlatformTransactionManager (AbstractPlatformTransactionManager.java:538) - Triggering beforeCompletion synchronization
2005-05-12 16:57:22,233 DEBUG [main] support.AbstractPlatformTransactionManager (AbstractPlatformTransactionManager.java:396) - Initiating transaction commit
2005-05-12 16:57:22,249 DEBUG [main] hibernate.HibernateTransactionManager (HibernateTransactionManager.java:468) - Committing Hibernate transaction on session [net.sf.hibernate.impl.SessionImpl@178feba]
2005-05-12 16:57:22,249 DEBUG [main] transaction.JDBCTransaction (JDBCTransaction.java:59) - commit
2005-05-12 16:57:22,249 DEBUG [main] impl.SessionImpl (SessionImpl.java:2267) - flushing session
2005-05-12 16:57:22,265 DEBUG [main] engine.Cascades (Cascades.java:497) - processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:22,265 DEBUG [main] engine.Cascades (Cascades.java:524) - cascading to collection: com.comerxia.core.model.Account.addresses
2005-05-12 16:57:22,280 DEBUG [main] engine.Cascades$4 (Cascades.java:113) - cascading to saveOrUpdate()
2005-05-12 16:57:22,280 DEBUG [main] impl.SessionImpl (SessionImpl.java:1382) - saveOrUpdate() persistent instance
2005-05-12 16:57:22,280 DEBUG [main] engine.Cascades (Cascades.java:506) - done processing cascades for: com.comerxia.core.model.Account
2005-05-12 16:57:22,296 DEBUG [main] impl.SessionImpl (SessionImpl.java:2467) - Flushing entities and processing referenced collections
2005-05-12 16:57:22,296 DEBUG [main] impl.SessionImpl (SessionImpl.java:2916) - Collection found: [com.comerxia.core.model.Merchant.users#1], was: [com.comerxia.core.model.Merchant.users#1]
2005-05-12 16:57:22,296 DEBUG [main] impl.SessionImpl (SessionImpl.java:2916) - Collection found: [com.comerxia.core.model.Account.addresses#708], was: [<unreferenced>]
2005-05-12 16:57:22,312 DEBUG [main] impl.SessionImpl (SessionImpl.java:2808) - Processing unreferenced collections
2005-05-12 16:57:22,312 DEBUG [main] impl.SessionImpl (SessionImpl.java:2822) - Scheduling collection removes/(re)creates/updates
2005-05-12 16:57:22,327 DEBUG [main] impl.SessionImpl (SessionImpl.java:2291) - Flushed: 2 insertions, 0 updates, 0 deletions to 3 objects
2005-05-12 16:57:22,343 DEBUG [main] impl.SessionImpl (SessionImpl.java:2296) - Flushed: 1 (re)creations, 0 updates, 0 removals to 2 collections
2005-05-12 16:57:22,343 DEBUG [main] impl.Printer (Printer.java:75) - listing entities:
2005-05-12 16:57:22,358 DEBUG [main] impl.Printer (Printer.java:82) - com.comerxia.core.model.Address{phone=null, dateCreated=null, id=2678, firstName=null, lastName=null, street2=Suite 200, postalCode=33020, nationalId=null, country=null, street1=1900 Tyler Street, description=desc, state=Florida, middleName=null, city=Hollywood}
2005-05-12 16:57:22,374 DEBUG [main] impl.Printer (Printer.java:82) - com.comerxia.core.model.Account{addresses=[Address#2678, null], password=null, merchant=Merchant#1, subscribed=null, shipToAddress=null, dateCreated=2005-05-12 16:57:18, id=708, firstName=JUnit, lastName=Test, passwordHintQuestion=null, goShoppingRegId=null, mallId=null, enabled=true, merchantCustomerId=test1115931427655, emailAddress=junit1115931427655@comerxia.com, localeCode=null, billToAddress=null, middleName=null, generatedEmailAddress=null, passwordHintAnswer=null}
2005-05-12 16:57:22,374 DEBUG [main] impl.Printer (Printer.java:82) - com.comerxia.core.model.Merchant{webServiceUserId=121, code=COMERXIA, enabled=true, users=uninitialized, description=Comerxia, legacySiteId=null, webServiceKey=COMERXIA, merchantGroup=MerchantGroup#1, legacyCobrandId=null, dateCreated=2005-04-07 16:04:35, id=1}
2005-05-12 16:57:22,374 DEBUG [main] impl.SessionImpl (SessionImpl.java:2380) - executing flush
2005-05-12 16:57:22,390 DEBUG [main] persister.EntityPersister (EntityPersister.java:447) - Inserting entity: [com.comerxia.core.model.Account#708]
2005-05-12 16:57:22,390 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:204) - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:22,390 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - insert into CORE.ACCOUNT (ENABLEDFLAG, EMAILADDRESS, FIRSTNAME, MIDDLENAME, LASTNAME, GENERATEDEMAILADDRESS, GOSHOPPINGREGID, LOCALECODE, MALLID, MERCHANTID, MERCHANTCUSTOMERID, PASSWORD, PASSWORDHINTANSWER, PASSWORDHINTQUESTION, BILLTOADDRESSID, SHIPTOADDRESSID, SUBSCRIBEDFLAG, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into CORE.ACCOUNT (ENABLEDFLAG, EMAILADDRESS, FIRSTNAME, MIDDLENAME, LASTNAME, GENERATEDEMAILADDRESS, GOSHOPPINGREGID, LOCALECODE, MALLID, MERCHANTID, MERCHANTCUSTOMERID, PASSWORD, PASSWORDHINTANSWER, PASSWORDHINTQUESTION, BILLTOADDRESSID, SHIPTOADDRESSID, SUBSCRIBEDFLAG, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2005-05-12 16:57:22,405 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:253) - preparing statement
2005-05-12 16:57:22,421 DEBUG [main] persister.EntityPersister (EntityPersister.java:382) - Dehydrating entity: [com.comerxia.core.model.Account#708]
2005-05-12 16:57:22,421 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'true' to parameter: 1
2005-05-12 16:57:22,437 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'junit1115931427655@comerxia.com' to parameter: 2
2005-05-12 16:57:22,437 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'JUnit' to parameter: 3
2005-05-12 16:57:22,452 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 4
2005-05-12 16:57:22,452 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'Test' to parameter: 5
2005-05-12 16:57:22,468 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 6
2005-05-12 16:57:22,468 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 7
2005-05-12 16:57:22,483 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 8
2005-05-12 16:57:22,483 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 9
2005-05-12 16:57:22,483 DEBUG [main] type.NullableType (NullableType.java:46) - binding '1' to parameter: 10
2005-05-12 16:57:22,499 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'test1115931427655' to parameter: 11
2005-05-12 16:57:22,499 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 12
2005-05-12 16:57:22,515 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 13
2005-05-12 16:57:22,515 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 14
2005-05-12 16:57:22,530 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 15
2005-05-12 16:57:22,530 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 16
2005-05-12 16:57:22,546 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 17
2005-05-12 16:57:22,562 DEBUG [main] type.NullableType (NullableType.java:46) - binding '2005-05-12 16:57:18' to parameter: 18
2005-05-12 16:57:22,562 DEBUG [main] type.NullableType (NullableType.java:46) - binding '708' to parameter: 19
2005-05-12 16:57:22,577 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:28) - Adding to batch
2005-05-12 16:57:22,577 DEBUG [main] persister.EntityPersister (EntityPersister.java:447) - Inserting entity: [com.comerxia.core.model.Address#2678]
2005-05-12 16:57:22,577 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:50) - Executing batch size: 1
2005-05-12 16:57:22,593 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:58) - success of batch update unknown: 0
2005-05-12 16:57:22,593 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:211) - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:22,608 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:275) - closing statement
2005-05-12 16:57:22,608 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:204) - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:22,624 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - insert into CORE.ADDRESS (DESCRIPTION, CITY, FIRSTNAME, LASTNAME, MIDDLENAME, PHONE, STATE, STREET1, STREET2, POSTALCODE, NATIONALID, COUNTRYCODE, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into CORE.ADDRESS (DESCRIPTION, CITY, FIRSTNAME, LASTNAME, MIDDLENAME, PHONE, STATE, STREET1, STREET2, POSTALCODE, NATIONALID, COUNTRYCODE, DATECREATED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2005-05-12 16:57:22,624 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:253) - preparing statement
2005-05-12 16:57:22,640 DEBUG [main] persister.EntityPersister (EntityPersister.java:382) - Dehydrating entity: [com.comerxia.core.model.Address#2678]
2005-05-12 16:57:22,640 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'desc' to parameter: 1
2005-05-12 16:57:22,655 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'Hollywood' to parameter: 2
2005-05-12 16:57:22,655 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 3
2005-05-12 16:57:22,655 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 4
2005-05-12 16:57:22,671 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 5
2005-05-12 16:57:22,671 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 6
2005-05-12 16:57:22,671 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'Florida' to parameter: 7
2005-05-12 16:57:22,687 DEBUG [main] type.NullableType (NullableType.java:46) - binding '1900 Tyler Street' to parameter: 8
2005-05-12 16:57:22,687 DEBUG [main] type.NullableType (NullableType.java:46) - binding 'Suite 200' to parameter: 9
2005-05-12 16:57:22,687 DEBUG [main] type.NullableType (NullableType.java:46) - binding '33020' to parameter: 10
2005-05-12 16:57:22,702 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 11
2005-05-12 16:57:22,702 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 12
2005-05-12 16:57:22,702 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 13
2005-05-12 16:57:22,718 DEBUG [main] type.NullableType (NullableType.java:46) - binding '2678' to parameter: 14
2005-05-12 16:57:22,718 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:28) - Adding to batch
2005-05-12 16:57:22,733 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:50) - Executing batch size: 1
2005-05-12 16:57:22,749 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:58) - success of batch update unknown: 0
2005-05-12 16:57:22,749 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:211) - done closing: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:22,749 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:275) - closing statement
2005-05-12 16:57:22,765 DEBUG [main] collection.AbstractCollectionPersister (AbstractCollectionPersister.java:510) - Inserting collection: [com.comerxia.core.model.Account.addresses#708]
2005-05-12 16:57:22,765 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:204) - about to open: 0 open PreparedStatements, 0 open ResultSets
2005-05-12 16:57:22,765 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
Hibernate: insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
2005-05-12 16:57:22,780 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:253) - preparing statement
2005-05-12 16:57:22,780 DEBUG [main] type.NullableType (NullableType.java:46) - binding '708' to parameter: 1
2005-05-12 16:57:22,796 DEBUG [main] type.NullableType (NullableType.java:46) - binding '2678' to parameter: 2
2005-05-12 16:57:22,796 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:28) - Adding to batch
2005-05-12 16:57:22,796 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:115) - reusing prepared statement
2005-05-12 16:57:22,812 DEBUG [main] impl.BatcherImpl (BatcherImpl.java:230) - insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
Hibernate: insert into CORE.LINKACCOUNTADDRESS (ACCOUNTID, ADDRESSID) values (?, ?)
2005-05-12 16:57:22,812 DEBUG [main] type.NullableType (NullableType.java:46) - binding '708' to parameter: 1
2005-05-12 16:57:22,827 DEBUG [main] type.NullableType (NullableType.java:41) - binding null to parameter: 2
2005-05-12 16:57:22,827 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:28) - Adding to batch
2005-05-12 16:57:22,843 DEBUG [main] collection.AbstractCollectionPersister (AbstractCollectionPersister.java:532) - done inserting collection: 2 rows inserted
2005-05-12 16:57:22,843 DEBUG [main] impl.BatchingBatcher (BatchingBatcher.java:50) - Executing batch size: 2
2005-05-12 16:57:22,874 DEBUG [main] util.JDBCExceptionReporter (JDBCExceptionReporter.java:49) - SQL Exception
java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("CORE"."LINKACCOUNTADDRESS"."ADDRESSID")
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:459)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:4133)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:231)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2438)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2396)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:472)