-->
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: Updating an object in different session without loading
PostPosted: Thu Sep 30, 2004 1:38 am 
Newbie

Joined: Sun Aug 29, 2004 1:37 am
Posts: 2
Hi...

I am sathish.I have the problem while updating an object using
session.update(ob) in the different session.

I save an item which has id,name,color and address properties. i save this item using session.save(item). It stored in the table with id=1

In different session i created an item and set the id=1 and set the name.
Then i used session.update(item). It is updated the new name in the table but other propereties updates as null values. How can i restrict that only avialble values are updated so that other values are safe.

Can we do the updation without loading the object.


Thank you ,
Sathish.G


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 30, 2004 7:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can't. Either load the object, or set all properties correctly. How should Hibernate know that you don't want a property to be null.


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.