I created a 1:m relation between two beans as follows:
/**
[EMAIL PROTECTED]
* name="FolderMayContainDevices"
* role-name="FolderToDevices"
* target-ejb="Device"
* target-multiple="yes"
* target-role-name="DeviceToFolder"
*
[EMAIL PROTECTED]
* related-pk-field="idÃÂ
* fk-column="folderIdÃÂ
*
[EMAIL PROTECTED]
*
*/
public abstract Collection getDevices(Integer folderId);
I get deployment error like this:
org.jboss.deployment.DeploymentException: Atleast one role of a foreign-key mapped
relationship must have key fields (or <primkey-field> is missing from ejb-jar.xml):
ejb-relation-name=FolderMayContainDevices
And I notice in jbosscmp-jdbc.xml that key-fields are empty. Are we missing any
attribute in ant task?
<ejb-relation>
<ejb-relation-name>FolderMayContainDevices</ejb-relation-name>
<relation-table-mapping>
</relation-table-mapping>
<ejb-relationship-role>
<ejb-relationship-role-name>FolderToDevices</ejb-relationship-role-name>
<key-fields/>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>DeviceToFolder</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name></field-name>
<column-name></column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
I guess the field-name and column-name need data here. but what is making it not
appear with generation
ant 1.6.2
jboss 4.0
xdoclet 1.2.1
Your help is appreciated.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851915#3851915
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3851915
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user