This content has been marked as final.
Show 2 replies
-
1. Re: Relationship mapping in jbosscmp-jdbc.xml
millerm1 Jul 1, 2004 1:55 PM (in response to rajs1)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,
Mark -
2. Re: Relationship mapping in jbosscmp-jdbc.xml
rajs1 Jul 2, 2004 5:56 AM (in response to rajs1)Much obliged squire, works a treat.
Cheers
-raj