-->
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: Modified persistent object ignored by saveOrUpdate
PostPosted: Tue Apr 26, 2005 12:02 pm 
Newbie

Joined: Thu Apr 14, 2005 6:26 pm
Posts: 4
I am pulling an object from the db to display in a form on the view tier. If the user modifes the data and hits save I need to do some processing of the data before persisting it. This processing involves reattaching some lazy loaded fields in the object. It seem that by reattaching the object and then trying to persist it all within the same session doesn't work. If i debug the code and look in the sesison i can see my object and the changes which were made to it but no sql ever get's sent to the database. Do I need to do my preprocessing in one session close it and then persist in another session?

I'm going to sneak one more question in here if i could. It seems that's it's possible to lazily initialize indvidual fields of an object by doing a
session.lock(persistentObj1.getPersistentObj2(),LockMode.NONE) . Is is possible to initialize a field which is a PersistentCollection in the same manner (i.e. just reattach the collection not the entrie parent object)?

Thanks!


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.