-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to use merge but ignore specific columns to merge data
PostPosted: Wed Jun 18, 2008 11:52 am 
Newbie

Joined: Fri Aug 05, 2005 2:56 pm
Posts: 11
I am attempting to merge a detached entity object with a pre-persisted entity. How do I ignore certain columns to merge. I have a create_sysdate column that I do not set on my detached object. So when I attempt to merge the entity I receive a create_sysdate column can not be null. Is there a simple way around this? Or do I need to run a query to obtain the create_sysdate and set it on the detached object. I hope there is an easier way.

-Kyle


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 1:01 pm 
Newbie

Joined: Fri Aug 05, 2005 2:56 pm
Posts: 11
Sorry everyone I answered my own question. In the column annotation i just simple add::

updatable = false


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 9:16 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Well done!

Thanks for posting back with the answer. It will help people who query the same problem.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.