-->
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: Joining on a candidate key
PostPosted: Tue Nov 04, 2003 4:12 pm 
Regular
Regular

Joined: Tue Sep 02, 2003 5:09 pm
Posts: 81
Location: Whitefish Montana
Is there any way to define a composite candidate key in a mapping association? I have two tables:

table 1:

id

properties-
candidatekey1
candidatekey2
table1name, etc

table 2:

somecompositeid

properties-
candidatekey1
candidatekey2
table2value, etc

I would like to define a one-to-many set by candidatekey1.
<set name="transactionCustomer" inverse="true" lazy="true">
<key>
<column name="key1"/>
<column name="key2"/>
</key>
<one-to-many class="com.xxx.TransactionCustomer" />
</set>

I realize this is not designed very well but it is what I have to work with and the transaction customer file is extremely large so adding table1.id is not practical right now.


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.