I'm having a problem getting a parent\child CMR setup, I get a
DeploymentException: Atleast one role of a foreign-key mapped relationship
must have key fields: ejb-relation-name=Link-Has-Parent-Link

ejb-jar.xml:
        <ejb-relation>
            <ejb-relation-name>Link-Has-Parent-Link</ejb-relation-name>
            <ejb-relationship-role>
 
<ejb-relationship-role-name>link-has-parent</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <relationship-role-source>
                    <ejb-name>LinkBean</ejb-name>
                </relationship-role-source>
 
<cmr-field><cmr-field-name>parentLink</cmr-field-name></cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
 
<ejb-relationship-role-name>link-is-parent-to-a-link</ejb-relationship-role-
name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>LinkBean</ejb-name>
                </relationship-role-source>
 
<cmr-field><cmr-field-name>childLinks</cmr-field-name></cmr-field>
            </ejb-relationship-role>
        </ejb-relation>

jbosscmb-jdbc.xml:
        <ejb-relation>
            <ejb-relation-name>Link-Has-Parent-Link</ejb-relation-name>
            <foreign-key-mapping/>
            <ejb-relationship-role>
 
<ejb-relationship-role-name>link-has-parent</ejb-relationship-role-name>
                <key-fields />
            </ejb-relationship-role>
            <ejb-relationship-role>
 
<ejb-relationship-role-name>link-is-parent-to-a-link</ejb-relationship-role-
name>
                <key-fields>
                    <key-field>
                        <field-name>id</field-name>
                        <column-name>parent_link_id</column-name>
                    </key-field>
                </key-fields>
            </ejb-relationship-role>
        </ejb-relation>

I've tried flipping my <key-fields> around to no avail.  Anyone with an
answer to this?

Thanks!

-Jerry


-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to