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: key generator for timestamp
PostPosted: Wed Jun 23, 2004 9:17 am 
Newbie

Joined: Fri Apr 16, 2004 3:56 am
Posts: 4
Hi everybody,

I want to write my own key generator providing a timestamp as primary key.
How can I do this? Any example might be helpful...

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2004 10:26 am 
Newbie

Joined: Wed Jun 23, 2004 10:18 am
Posts: 1
Hi,

it is very simple just create a new class and implement net.sf.hibernate.id.IdentifierGenerator interface.

return a Timestamp - Object in "generate" - method.

configure your new class as "generator class" and java.sql.Timestamp as "type".

that's it.

have fun
cu


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.