-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to update a query in other session ?
PostPosted: Tue Nov 30, 2004 1:13 pm 
Beginner
Beginner

Joined: Wed Aug 18, 2004 10:03 am
Posts: 28
Hibernate version: 2.1.7

Name and version of the database you are using: HSQLDB 1.7.2_9

Problem

I have Session1 and Session2, Session 1 is always open, to show all objects of type X (with query). Session 2 is opened, get an object, update it and then commit changes and close.
My problem is that Session1 (this session only get all objects with a query), only update information when i insert or delete an object, but if i update an object, the changes not is showed in the Session1 query.

How I show the changes ?

regards
epsino


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 30, 2004 1:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
use clear() or evict()


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 30, 2004 1:26 pm 
Beginner
Beginner

Joined: Wed Aug 18, 2004 10:03 am
Posts: 28
Thanks !!!

Your reply was very very very fast !!!

Only one more question:

clear() only refresh changes or delete all cached objects ¿?

Thanks a lot.

regards
epsino


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 30, 2004 1:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please read the API - clear() is an evict for all loaded objects, plus some more


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