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.  [ 3 posts ] 
Author Message
 Post subject: Session.Delete does nothing if no other action in trx
PostPosted: Tue Sep 18, 2007 6:03 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
If I delete an entity within a transaction that has other updates, the delete works fine. If the only action I take within a transaction is a delete, then it is never performed when the session is flushed and the transaction committed. I've monitored the database operations with SQL Server Profiler and the DELETE statement is never sent.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 19, 2007 2:38 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
We have FlushMode set to Never, and do flushing at required times like in our front-end method to Commit (although we could probably have set the FlushMode to Commit). However, if we flush before and after each individual delete, the delete goes through. Weird ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 19, 2007 7:00 pm 
Regular
Regular

Joined: Fri Jan 20, 2006 7:45 pm
Posts: 97
Location: San Antonio, TX
Did flush the session before or after the commit? If flushmode is never it seems like you would have to flush after commit.

_________________
Dum spiro, spero
-------------------------------
Rate my post if it helps...


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