-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to disable the session cache
PostPosted: Tue Nov 18, 2003 9:16 pm 
Regular
Regular

Joined: Sun Oct 26, 2003 9:02 pm
Posts: 90
Hi everybody

Is there a way to disable the session cache. I don't want Hibernate to persist my object automatically when the state changes. I want to be able to control when an object is persisted to the database. I can use evict but I wanted to know if there was a way to disable the session cache.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 18, 2003 9:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You can't disable it, because that would expose you to stack overflows where there are circular references, etc.


You can, however, either clear() it, or change the FlushMode.


Top
 Profile  
 
 Post subject: Can't find clear()
PostPosted: Thu Nov 20, 2003 10:55 pm 
Regular
Regular

Joined: Sun Oct 26, 2003 9:02 pm
Posts: 90
Hi

I haven't been able to find the clear method in the session class. I just want to disable the automatic persistance of objects in the session cache that have been modified. Is there a way to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 20, 2003 11:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
clear() is in 2.1.

another option is to just not flush()


Top
 Profile  
 
 Post subject: Can't do without flush() when working with LOB in Oracle.
PostPosted: Thu Nov 20, 2003 11:44 pm 
Regular
Regular

Joined: Sun Oct 26, 2003 9:02 pm
Posts: 90
Can't do without flush() when working with LOB in Oracle.


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