-->
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: Update strategy when some property's value is null
PostPosted: Fri Apr 15, 2011 1:08 am 
Newbie

Joined: Fri Apr 15, 2011 12:50 am
Posts: 1
For example:
Define an entity class "User":

private Long id;//primary key
private String name;
private String address;

I use session.update to update the attached entity sourced from a web form . when the property "address" value is null, I need Hibernate does not update the field into database.
So hibernate suppports the strategy? Please help me, thanks!


Top
 Profile  
 
 Post subject: Re: Update strategy when some property's value is null
PostPosted: Mon Apr 18, 2011 8:36 am 
Newbie

Joined: Wed Mar 23, 2011 2:47 am
Posts: 8
in database set default as null. in hebernate programming not update it (simply leave it)


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.