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: Help with flush and it`s behavior
PostPosted: Tue Oct 10, 2006 12:39 pm 
Newbie

Joined: Tue Jul 25, 2006 2:50 am
Posts: 11
NHibernate version:
Version 1.2 Beta 1

Hello all!!

I have a problem or a doubt with the beta 1 of version 1.2

I´m using always the same session object

When I do a session.Flush() this function try to flush all the objects even when it's not necessary. Is that normal?

On the other hand, I have session.flushmode = auto. When I do a query because the flushmode is auto Nhibernate flush all the objects, and when I do a new query all the object are flushed again widthout any pending insert, update.... It slow down the app a lot, someone realized this issue?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 4:24 pm 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
You are probably discovering 'transparent-write-behind' where NHib synchronizes the Db on each Flush() with any entities that were brought in during that Session.
This is normal behavior. If you really want to control it more granularly you can change tthe flush mode to Commit and it will only synchronize when you tell it to.

Hibernate in Action the book has more details.

_________________
If this helped...please remember to rate it!


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.