-->
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.  [ 2 posts ] 
Author Message
 Post subject: deferred constraints [bidirectional not null]
PostPosted: Fri Oct 21, 2011 12:18 pm 
Newbie

Joined: Sat Sep 12, 2009 12:50 pm
Posts: 6
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


Top
 Profile  
 
 Post subject: Re: deferred constraints [bidirectional not null]
PostPosted: Tue Nov 01, 2011 4:51 pm 
Newbie

Joined: Sat Sep 12, 2009 12:50 pm
Posts: 6
no solution for this? Only oracle functioning correctly?


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