-
1. Re: CMR Relation-Table generates strange table names.
tdang Jul 31, 2002 4:26 AM (in response to sloth81)Your information are not enough to find out the problem. I recommend you to post your configuration files on the forum so that we can see where the problem really is.
-
2. Re: CMR Relation-Table generates strange table names.
sloth81 Jul 31, 2002 6:42 PM (in response to sloth81)Ok here are the sections of the files, JBoss seems to create its own table name and not use mine...
In ejb-jar.xml
<ejb-relation>
<ejb-relation-name>Project-ProjectManager</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Project-Has-ProjectManager</ejb-relationship-role-name>
One
<relationship-role-source>
<ejb-name>Team</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>projectManager</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>ProjectManager-Has-Project</ejb-relationship-role-name>
One
<relationship-role-source>
<ejb-name>TeamMember</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
In jbosscmp-jdbc.xml
<ejb-relation>
<ejb-relation-name>Project-ProjectManager</ejb-relation-name>
<table-mapping>
<table-name>PROJECT_PROJECTMANAGER_LINK</table-name>
<create-table>true</create-table>
<remove-table>false</remove-table>
<ejb-relationship-role>
<ejb-relationship-role-name>Project-Has-ProjectManager</ejb-relationship-role-name>
<table-key-fields>
<field-name>projectID</field-name>
<column-name>PROJECT</column-name>
</table-key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>ProjectManager-Has-Project</ejb-relationship-role-name>
<table-key-fields>
<field-name>teamMemberID</field-name>
<column-name>TEAM_MEMBER</column-name>
</table-key-fields>
</ejb-relationship-role>
</table-mapping>
</ejb-relation> -
3. Re: CMR Relation-Table generates strange table names.
sloth81 Jul 31, 2002 7:19 PM (in response to sloth81)Never mind,
I checked my jbosscmp-jdbc.xml against the dtd and found some errors, everything works now. You guys might wanna update the cmp part of the jboss book, the example doesnt match the dtd!