-->
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 execution of DML statements inside a transaction
PostPosted: Fri Apr 01, 2005 11:25 am 
Regular
Regular

Joined: Fri Sep 17, 2004 10:51 am
Posts: 61
Location: Rimini, Italy
Hi all,
I've experienced a problem: in a single transaction I deleted an object and created a new one with a different id but with a field that duplicates one of the old object, on which ther's a UNIQUE constraint on the DB.
This shouldn't be a problem, since I'm removing the old object, but Hibernates doesn't executes DML in the same order they're execute, so the insert is executed before the delete.
I know I can use flush() method to force the execution of the delete, but I'm wondering if there's a better solution.
[/u]

_________________
--
Marco


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.