-->
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: Clearing session of certain collections
PostPosted: Mon Sep 12, 2005 10:11 am 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.5
Name and version of the database you are using: DB2 8.2

I was wondering if there is anyway to clear the sessioin of only certain collections or objects.

My understanding is whenever I call session.clear() , it clears the session of everything. But what if I have some objects is session which I want to keep and I only want to clear the session of some collections that I do not need and may cause overflow in the session. I am looking for a way to be able to do

session.clear(Collection mycollection)

rather than calling

session.clear()

Thanks for your replies in advance,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 11:05 am 
Pro
Pro

Joined: Fri Sep 02, 2005 4:21 am
Posts: 206
Location: Vienna
AFAIK there is no possibility to remove objects from the Session that has the granularity of a Collection - you have evict(Object) or clear().

Don't you think that evict could do the job (at the cost of writing "silly" loops)?

Erik


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.