Hello,
today I migrated from hibernate with innoDB mysql dialect to hibernate with postgresql. I use transactions managed by jboss.
Already the first "insert testdata" function of my application does not work anymore.
CUSTOMER has several relations to ADDRESS (billingaddress, shippingaddress, main address) with not null constraint. ADDRESS has a relation to CUSTOMER with not null constraint.
My application creates a customer, then several for this customer and saves the addresses. then the customer is saved.
It seems that the constraints are not checked at end of the transaction, but immediately. the first address gets saved and raises a constraint error (customer is null).
This worked perfectly under mysql. What to do here? If i save customer first, he does not have addresses already.....
Thanks,
Thomas
|