-->
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: Refresh the objects if the db field was updated/deleted
PostPosted: Wed Oct 13, 2004 6:33 am 
Newbie

Joined: Wed Oct 06, 2004 3:20 am
Posts: 12
Hello!

Does someone know, how to refresh the objects,if i deleted,or update the object in the database?

e.g.

i call a contactlist of my user " test", there's a contact called "myfriend"
with user.getContacts()

now in a query, i delete or update the contact "myfriend"

if i take a look at my "test" user, the contact "myfriend" still exist or the old datas or showed.

how can i update my user, that there is the new myfriend or that there is no more "myfriend"


thanks a lot!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 15, 2004 8:02 am 
Newbie

Joined: Wed Oct 13, 2004 5:32 am
Posts: 8
i had the same problem.... my solution was:

HibernateUtil.currentSession().refresh(Object object);

(replace object with your updated object)


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.