-->
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: Generator class for non primary columns
PostPosted: Mon Jun 22, 2009 2:33 am 
Newbie

Joined: Wed Nov 19, 2008 3:13 am
Posts: 4
hi as we all know we can configure a generator class for primary key in table.
i wanted the same for non-primary column.
can any one tell me how to do that with hibernate...


Top
 Profile  
 
 Post subject: Re: Generator class for non primary columns
PostPosted: Mon Jun 22, 2009 7:21 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
You can not directly use genrator class for property fields(non primary) in hibernate mapping, but your requirement can be acheived through formula of property.


Top
 Profile  
 
 Post subject: Re: Generator class for non primary columns
PostPosted: Tue Jun 23, 2009 2:42 am 
Newbie

Joined: Wed Nov 19, 2008 3:13 am
Posts: 4
yes thanks for yo reply
is it possible to combine two tables with the single formula

say for examble i have 3 tables A, B, C
B and C are sub tables of A

A = id (primary)
B = id (primary), requestId(property)
C = id (primary), requestId(property)

here id is common for all the 3 tables for a record.
now want to have a formula for requestId.
and tht should be in sequence. unique for the tables B and C

any idea???


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.