-
1. Re: Can I map a cmr field to a table column?
dsundstrom May 13, 2002 8:38 PM (in response to will.houck)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.
-
2. Re: Can I map a cmr field to a table column?
jcasp May 15, 2002 12:57 PM (in response to will.houck)The only forum article i was able to find that seems relevant to this problem is here:
http://main.jboss.org/forums/thread.jsp?forum=46&thread=11626&message=2433376&q=cmr+column+mapping#2433376
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
Justin -
3. Re: Can I map a cmr field to a table column?
jcasp May 17, 2002 1:57 PM (in response to will.houck)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.
thanks Dain! -
4. Re: Can I map a cmr field to a table column?
milasx Jan 23, 2003 6:28 AM (in response to will.houck)Did you manage to have it working from XDoclets? I am referring to the XDoclet example Country - City and that does not work.
Thanks
Simone