| 
							
					| 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.
 
 
 |  |