-->
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.  [ 1 post ] 
Author Message
 Post subject: Order of the execution of the queries resukting in org.hiber
PostPosted: Wed Nov 15, 2006 5:48 am 
Newbie

Joined: Wed Nov 15, 2006 5:36 am
Posts: 1
We have the following hierarchy in the business model:
A has an association with B and C.

In the database:
B holds the FK of A and C holds the FK of A.

We are facing a problem when the operation should result in the DELETE of the entire hierarchy.
This problem occurs ONLY AT TIMES AND NOT ALWAYS.

Probelm Defn:
The delete method is being called on the OBJECTS in the following order:
1. C
2. B
3. A

However, at times, the order in which hibernate fires the delete queries differs from the order mentioned above.
Hence, that resutls in the following error:
org.hibernate.exception.ConstraintViolationException: could not delete:[]

Could there be a problem in the order in which Hibernate exceutes the queries.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.