Hello!

I have CMP entity beans with CMR relations, example:
Mandator 1 ----- * Description

My ejb-jar.xml
<ejb-relation >
         <ejb-relation-name>mandator-mandatorDescription</ejb-relation-name>
         <ejb-relationship-role >       
<ejb-relationship-role-name>description-belongs-to-mandator</ejb-relationship-role-name>
    Many
            <cascade-delete/>
            <relationship-role-source >
               <ejb-name>MandatorDescription</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>mandator</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>
         <ejb-relationship-role >    
<ejb-relationship-role-name>mandator-has-descriptions</ejb-relationship-role-name>
        One
            <relationship-role-source >
               <ejb-name>Mandator</ejb-name>
            </relationship-role-source>
            <cmr-field >
               <cmr-field-name>descriptions</cmr-field-name>
               <cmr-field-type>java.util.Collection</cmr-field-type>
            </cmr-field>
         </ejb-relationship-role>
      </ejb-relation>

My jbosscmp-jdbc.xml
<ejb-relation>
 <ejb-relation-name>mandator-mandatorDescription</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>
                        description-belongs-to-mandator
                    </ejb-relationship-role-name>
                            <key-fields/>
                </ejb-relationship-role>

                <ejb-relationship-role>
                    <ejb-relationship-role-name>
                        mandator-has-descriptions
                    </ejb-relationship-role-name>
                        <fk-constraint>
                            true
                        </fk-constraint>
                            <key-fields>
                                    <key-field>
                                        <field-name>
                                            id
                                        </field-name>
                                        <column-name>
                                            MAND_MAN_ID
                                        </column-name>
                                    </key-field>
                            </key-fields>
                </ejb-relationship-role>
            </ejb-relation>

A fc constraint should be created on the MAND_MAN_ID column in the MANDATOR 
table. In JBoss version 3.2.3 it works fine. I try to switch to version 4.0.1 
but with this version fk constraints are not created. I use MySQL, in both 
cases the same version. Can anyone help me with this problem?

Best Regards
Michael


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3864359#3864359

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3864359


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to