-->
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: how to map multiple properties to a single table?
PostPosted: Sat Aug 05, 2006 12:18 pm 
Newbie

Joined: Sat Aug 05, 2006 12:05 pm
Posts: 2
i'd like to achieve this kind of relationship in hibernate. is it possible?


table1:
id
addressType1 ----> addressTypeId
addressType2 -----> addressTypeId
...

table2:
id
addressType1 -----> addressTypeId

table3:
id
addressTypeId
addressTypeDesc

thanks

_________________
alexa


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 4:21 pm 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
Hibernate (and databases) allow any relationship on fields other than primary key, you must just set the reference field(s) on the many-to-one or other relations.

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


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.