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: Auto incrementing a field?
PostPosted: Wed Nov 15, 2006 11:22 am 
Newbie

Joined: Wed Oct 04, 2006 5:43 am
Posts: 3
I have a field in a database table which records the number of times the record has been updated, updatedQuantity.

I want this field to auto-increment when I do an update using Hibernate. Is there a property I can set in the mapping file which will make this happen?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 2:31 pm 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
Can you define a property and mark it as generated="always". Refer to section "Generated Properties" at
http://www.hibernate.org/hib_docs/v3/re ... -generated


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.