-->
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.  [ 4 posts ] 
Author Message
 Post subject: use stored procedure as id generator for hibernate anotation
PostPosted: Sun Jan 21, 2007 4:08 am 
Newbie

Joined: Fri Jan 19, 2007 11:44 pm
Posts: 3
Is it possible to use my owned stored procedure as id generator?
Because I need to pass some arguments to the stored procedure to generate id. For example, I like to generate id in the format "ODR-yyyyMMdd-0001". Is it possible? How to? Many thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 9:06 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
yes implement a IdentityGenerator and use @GenericGenerator

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 10:28 pm 
Newbie

Joined: Fri Jan 19, 2007 11:44 pm
Posts: 3
Thanks for your response. I will survey it.
May you give some code example?
Thank you very much.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 3:02 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
sorry, I don't have any concrete code, I know people have done that

_________________
Emmanuel


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