This content has been marked as final.
Show 1 reply
-
1. Re: Atleast one role of a foreign-key mapped relationship mu
chiba Sep 13, 2003 6:19 AM (in response to hlship)"oscpro" wrote:
"oscpro" wrote:
"oscpro" wrote:
Hi,
I found a solution. In jbosscmp-jdbd.xml you add:<relationships> ... <ejb-relation> <ejb-relationship-role> <ejb-relationship-role-name>role-name</ejb-relationship-role-name> <key-fields> <key-field> <field-name><!-- include here the name of the primary key field of the other side (ie. id)--></field-name> <column-name><!-- include here the name you want to give to you foreign key column (ie. address_id)--></column-name> </key-field> </key-fields> </ejb-relationship-role> ... </ejb-relation> </relationships>
If you use xdoclet you just add:... * * @jboss.relation * related-pk-field = "id" * fk-column = "adress_id" * ...