I have two many to many cmp entity beans. a userbean,a rolebean. There are three tables in database:usertable, roletable,userrolemaptable. The PK of userrolemaptable is two fk:userid, roleid. Now i want to update the userrolemaptable. How can i do it?I haven't the userrolemapbean.
I would check your vendors documentation for either many-to-many unidirectional or bidirectional relationship. The EJB spec has some material on it in chapter 10.5 but vendor docs will probably be more useful.
Caroline Iux,if u use cmp,it's very convenience to deal with m:n relations. To tell u the truth,I'm not familiar with deploy description.I finish this work under the help of jbuilder's ejbmodule.From ejb-jar.xml: <ejb-relation> <ejb-relation-name>userEntity-roleEntity</ejb-relation-name> <ejb-relationship-role> <description>userEntity</description> <ejb-relationship-role-name>UserEntityRelationshipRole</ejb-relationship-role-name> <multiplicity>Many</multiplicity> <relationship-role-source> <description>userEntity</description> <ejb-name>UserEntity</ejb-name> </relationship-role-source> <cmr-field> <description>roleEntity</description> <cmr-field-name>roleEntity</cmr-field-name> <cmr-field-type>java.util.Collection</cmr-field-type> </cmr-field> </ejb-relationship-role> <ejb-relationship-role> <description>roleEntity</description> <ejb-relationship-role-name>RoleEntityRelationshipRole</ejb-relationship-role-name> <multiplicity>Many</multiplicity> <relationship-role-source> <description>roleEntity</description> <ejb-name>RoleEntity</ejb-name> </relationship-role-source> <cmr-field> <description>userEntity</description> <cmr-field-name>userEntity</cmr-field-name> <cmr-field-type>java.util.Collection</cmr-field-type> </cmr-field> </ejb-relationship-role> </ejb-relation> </relationships> From weblogic-cmp-rdbms-jar.xml: <weblogic-rdbms-relation> <relation-name>userEntity-roleEntity</relation-name> <table-name>BZUSERROLEMAPTB</table-name> <weblogic-relationship-role> <relationship-role-name>UserEntityRelationshipRole</relationship-role-name> <column-map> <foreign-key-column>USERID</foreign-key-column> <key-column>USERID</key-column> </column-map> </weblogic-relationship-role> <weblogic-relationship-role> <relationship-role-name>RoleEntityRelationshipRole</relationship-role-name> <column-map> <foreign-key-column>ROLEID</foreign-key-column> <key-column>ROLEID</key-column> </column-map> </weblogic-relationship-role> </weblogic-rdbms-relation> May this help u.
SCJP(2001)
Legend has it that if you rub the right tiny ad, a genie comes out.
Gift giving made easy with the permaculture playing cards