各位大虾们好,小弟最近碰到一个问题,望大家能帮忙解决.
1.项目中有个自定义的复合主键类,如下:
public class PsnDiviAccountsPK implements Serializable {    
    public String certno;
    public String planCode;    public PsnDiviAccountsPK() {
    }    public PsnDiviAccountsPK(String certno, String planCode) {
        this.certno = certno;
        this.planCode = planCode;
    }
    ....
}2.在ejb_jar.xml文件里面配置如下:
<entity>
            <display-name>ejb/components/PsnDiviAccounts</display-name>
            <ejb-name>ejb/components/PsnDiviAccounts</ejb-name>
            <home>com.taiping.life.pension.ejb.entity.PsnDiviAccountsHome</home>
            <remote>com.taiping.life.pension.ejb.entity.PsnDiviAccounts</remote>
            <ejb-class>com.taiping.life.pension.ejb.entity.PsnDiviAccountsBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>com.taiping.life.pension.ejb.entity.PsnDiviAccountsPK</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>PsnDiviAccounts</abstract-schema-name>
            <cmp-field>
                <field-name>accountNo</field-name>
            </cmp-field>
            ....
</entity>在最后有个primkey-field 节点是配置主键列的,我这边用自定义的复合主键类,所有不用配置该节点
下面有个one to one 的cmr 
<ejb-relation>
<ejb-relation-name>PsnDiviAccounts_AcctStsTbl</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>PsnDiviAccounts_AcctStsTbl_RelationShipRole</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>ejb/components/PsnDiviAccounts</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>localAcctStsTbl</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>AcctStsTbl_PsnDiviAccounts_RelationShipRole</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>ejb/components/AcctStsTbl</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>容器我这边使用的weblogic,数据库使用的oracle...这样还需要加一个描述文件weblogic-rdbms-jar.xml,里面应该怎么去配置关系?ps:现在主键为一个字段的,没有使用自定义的主键类的配置如下
 <weblogic-rdbms-relation>
<relation-name>PolCapital_FeeType</relation-name>
<weblogic-relationship-role>
<relationship-role-name>PolCapital_FeeType_RelationShipRole</relationship-role-name>
<column-map>
<foreign-key-column>AMT_TYPE</foreign-key-column>
<key-column>TYPE_ID</key-column>
</column-map>
</weblogic-relationship-role>
</weblogic-rdbms-relation>
如果为主键为两个字段的自定义主键类应该怎么配置呢.