-->
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: custom pk generation, and then some....
PostPosted: Tue Jul 27, 2004 9:46 am 
Newbie

Joined: Wed Jun 30, 2004 11:00 am
Posts: 7
Hi,

I have an interesting primary key requirement. One of our entities needs some special functionality which I'm a uncertain how to accomplish with hibernate.

The primary key of the table is a standard sequence like any other entity. Where it is different is that I need to step in after pk generation, encode the sequence into a fixed length string, and then set it on another column/property.

Can some one point me in the right direction? Is there some delegate or lifecycle API that can help me with this sort of problem?

Thanks in advance.
Eric


Top
 Profile  
 
 Post subject: Solved
PostPosted: Fri Jul 30, 2004 11:40 am 
Newbie

Joined: Wed Jun 30, 2004 11:00 am
Posts: 7
Apparently, this was too easy a problem to get a reply. For any that are interested I had my POJO implement the Lifecycle class and set the value in onSave(). Works really well.


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.