-->
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: Unexpected behavior on Select - Updating during Flush
PostPosted: Wed Jun 14, 2006 6:12 pm 
Newbie

Joined: Wed Jun 23, 2004 4:35 pm
Posts: 13
[b]Hibernate version:[/b] 3.1.3

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:[/b] Sybase, vers ?



I need some help understanding hibernate behavior -

I have to select a large collection using IDs in an IN (x,y,...z) clause. There is a limitation as to the number of elements I can use so I have had to resort to breaking the list into parts.

Between groups, the data is verified and, in some cases, manipulated.

When I go to get the next group, objects which have been manipulated are marked to be updated on the flush.

Why does this happen and how do I prevent it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 6:34 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
Answer is in your question

Quote:
objects which have been manipulated are marked to be updated on the flush


So when hibernate does a flush it does dirty checking ( automatic ) and syncs up the data with the db.

As to second question

you can do

session.setFlushMode(FlushMode.NEVER)

_________________
Don't forget to rate


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.