You guys have probably seen my previous posts on cmr mapping not working. I was told to go look at the test suite for working examples. Below is what I found, I cannot believe this test would pass. There is not enough information on the JBosscmp-jdbc.xml file to complete the mapping, how does it know where to map the field? You be the judge yourself. I am trying to get a fully working cmp so I recommend JBoss to my boss, unfortunately I haven't been able to do so yet.
Here are the excerpts from the tests:
ejb-jar:
<ejb-relation>
<ejb-relation-name>AB_OneToOne_Uni_FK</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>A-belongsto-B</ejb-relationship-role-name>
One
<relationship-role-source>
<ejb-name>A_OneToOne_Uni_FK_EJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>b</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>B-belongsto-A</ejb-relationship-role-name>
One
<relationship-role-source>
<ejb-name>B_OneToOne_Uni_FK_EJB</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
jbosscmp-jdbc.xml:
<ejb-relation>
<ejb-relation-name>AB_OneToOne_Uni_FK</ejb-relation-name>
<foreign-key-mapping/>
</ejb-relation>
If this test is passing then we got to write a test for the test.
There is plenty of information for what the test writer wanted. The test writer just wanted to be sure that the relationship was mapped using a foreign key, and did not care about the exact column mapping. This is allowed.