-->
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.  [ 1 post ] 
Author Message
 Post subject: Generating a value for a non-primary key property
PostPosted: Wed Nov 08, 2006 11:04 am 
Newbie

Joined: Wed Nov 08, 2006 10:54 am
Posts: 1
Hi there!

How can I let Hibernate generate a unique, say, Long value for a property, that is not actually the primary key?
I'm aware of the possibility to delegate the generation of a property value to the database itself, but I'm trying to keep the solution database independent.
I really would like something like:

<property name = "functionalId" column = "FUNC_ID"
<generator class = "increment" />
</property>

Can it be done, and, if so, how?

Thanx for your replies!

David Gofferje
David.Gofferje@Getronics.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.