This content has been marked as final. Show 2 replies
I think this is what you need. The only thing you need to fill in is the field name of the primary key field for the country. I marked where that needs to go in the xml below.
<ejb-relation> <ejb-relation-name>CountryEJB - TradingCentreEJB</ejb-relation-name> <ejb-relationship-role> <ejb-relationship-role-name>TradingCentre-belongs-to-a-Country</ejb-relationship-role-name> <key-fields/> </ejb-relationship-role> <ejb-relationship-role> <ejb-relationship-role-name>Country-has-many-TradingCentres</ejb-relationship-role-name> <key-fields> <key-field> <field-name>XfieldName of primary key for countryX</field-name> <column-name>country_code</column-name> </key-field> </key-fields> </ejb-relationship-role> </ejb-relation>
Hope this helps,
Much obliged squire, works a treat.