posted 16 years ago
I use session.save(customer);
My problem is that ,
Now my custonmer table has a child CUST_IDEN. The statement
session.save(customer);
does not throw any exception if there is a primary key violation in CUST_IDEN table. Instead the exception is thrown only later when i commit the transaction.
Is this how it is supposed to happen?
The CUSTOMER hbm file contains this entry which relates it to the CUST_IDEN table
<set name="identifiers" cascade="all-delete-orphan" inverse="true" lazy="true" table="CUST_IDEN">
<key column="CUST_ID" update="true" not-null="true" />
<one-to-many class="CustomerIdentifier"/>
</set>