-->
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: Updating only certain fields.
PostPosted: Mon Jan 24, 2005 11:32 am 
Newbie

Joined: Wed Jul 07, 2004 1:25 pm
Posts: 3
Hi, is there a way to only updates certain columns of a class?. The idea is that some users can update certain fields of one table and other users can update different fields.
Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 11:36 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Have a look at this one
http://www.hibernate.org/hib_docs/reference/en/html_single/#mapping-declaration-class

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Will that work in this case?
PostPosted: Mon Jan 24, 2005 12:07 pm 
Newbie

Joined: Wed Jul 07, 2004 1:25 pm
Posts: 3
So:
I assume the solution is to set my class to dynamic-update=true, and only change the appropriate columns in the code, right?
now,
If I have a table with product name and quantity, and One user is updating the product name and another the quantity at the same time (therefore both columns are changing)
Will Hibernate think that all the columns have changed for both users? or does it cache the information per user session?
Is that what the select-before-update addresses?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 12:17 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
There is also a chapter about transactions and working with persistent data in the documentation. Your questions are answered there.


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.