Hi,
If A is 1 and B is n.
In A class descriptor write :
<collection-descriptor name="relation_name_in_A_class"
element-class-ref="url.B">
<inverse-foreignkey field-ref="mykey"/>
</collection-descriptor>
And in B class descriptor write this
<field-descriptor name="mykey" column="mycolumn" jdbc-type="INTEGER"/>
Here mykey is the foreignkey but not a primary key !
Hope it helps you,
�ric
-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Envoy� : jeudi 27 novembre 2003 16:57
� : [EMAIL PROTECTED]
Objet : Mapping question
Hi,
I've got a 1:n mapping from table A to table B. But the foreign key field of
table A is not it's primary key. I can't find how to tell OJB to use another
field to join table B.
Thanks for help, Norbert.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]