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.  [ 1 post ] 
Author Message
 Post subject: refresh does not work!
PostPosted: Fri Oct 16, 2009 11:40 am 
Regular
Regular

Joined: Tue Feb 17, 2009 5:13 am
Posts: 59
Hi all.

I have loaded an object from DB, then I have update a field and finally I have invoke the saveOrUpdate method to persist the changes.

In the onFlushDirtyMethod of my interceptor, I update a field of the father (one-to-many bidir) with an SQL query. Then I invoke the refresh method for the father entity. What I try is to have the UPDATED father entity attached to the session.

The problem is that, although the father entity is correctly updated in the DB, the (father) entity, after refresh invocation, is not updated.

Is there any way to do this.

Note: in my case is not valid simply modify the father instance via original entity because, although is session-attached, the changes are not persisted.

_________________
Born to lose... live to win!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.