-->
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: Use sequence but not as identifier
PostPosted: Fri Jan 20, 2012 4:55 am 
Newbie

Joined: Tue Nov 11, 2008 8:33 am
Posts: 5
Is there a way to configure a SequenceStyleGenerator for use not as a identifier on an entity, but as a generator for unique numbers?
I would like a database sequence to be used for generating just a number, then put a value together by appending the sequence value to a string like A-100, A-101, B-102...


Top
 Profile  
 
 Post subject: Re: Use sequence but not as identifier
PostPosted: Fri Jan 20, 2012 8:20 am 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
We wanted that too and implemented it by using a trigger. But we have to perform a refresh afterwards (if we want to work with that saved entity). We did that by a custom annotation which is being interpreted by our persistence layer.


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.