Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Jboss CMR one-to-one Error: Key Field not found

843830Mar 7 2005
Hi,

I tried to do the CMR one-to-one relationship using the CMP method. But I keep getting the Key Field Not Found: subCategory error when I deploy. Below are my xml files. Both my ejb have the subCatefiry field which i use as a primary key in one table and foreign key in the other. Please help. I really don't have any idea where is wrong already. Thanks.

ejb xml
	<relationships>	
	    <ejb-relation>
	        <ejb-relation-name>FieldCode-CodeMap</ejb-relation-name>
	        <ejb-relationship-role>
	            <ejb-relationship-role-name>fieldcode-spawns-codemap</ejb-relationship-role-name>
	            <multiplicity>One</multiplicity>
	            <relationship-role-source>
	                <ejb-name>EBFieldMap</ejb-name>
	            </relationship-role-source>
	            <cmr-field>
	                <cmr-field-name>codeMap</cmr-field-name>
	            </cmr-field>
	        </ejb-relationship-role>
	        <ejb-relationship-role>
	            <ejb-relationship-role-name>codemap-links-to-fieldcode</ejb-relationship-role-name>
	            <multiplicity>One</multiplicity>
	            <relationship-role-source>
	                <ejb-name>EBCodeMap</ejb-name>
	            </relationship-role-source>
	        </ejb-relationship-role>
	    </ejb-relation>
	</relationships>
jboss xml
    <relationships>
        <ejb-relation>
            <ejb-relation-name>FieldCode-CodeMap</ejb-relation-name>
            <foreign-key-mapping/>
            <ejb-relationship-role>
                <ejb-relationship-role-name>fieldcode-spawns-codemap</ejb-relationship-role-name>
                <key-fields>
                    <key-field>
                        <field-name>subCategory</field-name>
                        <column-name>subcat</column-name>
                    </key-field>          
                </key-fields>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>codemap-links-to-fieldcode</ejb-relationship-role-name>
                    <key-field>
                        <field-name>subCategory</field-name>
                        <column-name>subcat</column-name>
                    </key-field>  
            </ejb-relationship-role>
        </ejb-relation>
    </relationships>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2005
Added on Mar 7 2005
0 comments
178 views