-->
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: Composite-key with single columns and concatenated values
PostPosted: Tue Sep 22, 2009 6:32 pm 
Newbie

Joined: Tue Sep 22, 2009 6:12 pm
Posts: 1
Hi, Guys.

I need to map a entity with a composite-key like the example below:

[Person]
PersonPK id
String name
Integer age

[PersonPK]
Long id
String type
String gender

However, my PERSON_TABLE primary-key has only a single VARCHAR column that only accepts values like "1234-B-M", where "1234" is a generated value, "B" is the type and "M" is the gender.

So, as you may have seen, I need to map PersonPK to a single column with its values concatenated. How can I do that?

Thanks!


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.