-->
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: Version mapping declaration
PostPosted: Tue Sep 21, 2004 2:46 pm 
Newbie

Joined: Sun Sep 19, 2004 4:11 pm
Posts: 1
Location: Brazil
Hibernate version: 2.1.6


All my tables have two version columns, last_update_date and creation_date. I want to use the tag version mapping to control the creation date end the last update date of the record. How can I do this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 21, 2004 4:20 pm 
Newbie

Joined: Thu Jun 24, 2004 2:19 am
Posts: 10
i dont think hibernate has built-in support for this.
i guess the creation date is something you could set with an Interceptor and the last updated with a timestamp (or you could handle both in the interceptor).
the DTD allows only one timestamp mapping per class so there is no way to map both dates trough timestamp properties.

pascal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 22, 2004 2:04 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
lastupdatetime --> timestamp

in the lastUpdateTime setter: if creationTime is null, creation time = lastUpdateTime

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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.