It is in my new docs, but until they are out you will have to rely on the examples in the forum. The dtd is also documented.
The only forum article i was able to find that seems relevant to this problem is here:
when I examine the jbosscmp-jdbc dtd in the latest CVS revision, I see that 'key-fields' are an option in an 'ejb-relationship-role' :
<!ELEMENT ejb-relationship-role (ejb-relationship-role-name,
fk-constraint?, key-fields?, read-ahead?)>
but when I use <key-fields> and specify a <key-field> within, I get this error:
2002-05-15 13:40:03,281 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: create
org.jboss.deployment.DeploymentException: Role: (MyRole) with multiplicity many using foreign-key mapping is not allowed to have key-fields
I know that the relationship defaults to foreign-key-mapping and this is fine. How can I specify the cmr field's column mapping when using foreign-key-mapping?
thanks in advance
for anyone else out there having this problem, Dain replied on the mailing list advising me to switch the locations of the <key-fields> elements in the roles. note that the <field-name> element should match the key field name of the parent not the name of the child's foreign key name.
Did you manage to have it working from XDoclets? I am referring to the XDoclet example Country - City and that does not work.