anonymous wrote : | Is it permitted for the foreign key to point not to the primary key of the one side but to a common CMP field? | No, the foreign key constraint must be with a primary key.
anonymous wrote : | Moreover, I'd like to make this relationship unidirectional to the one side, using a Collection typed CMR field. | How this could be accomplished using XDoclet? | Here is it: | * @ejb.interface-method | * @ejb.relation | * name="BeanA in relation with BeanB" | * role-name="BeanA-has-many-BeanB" | * target-ejb="BeanB" | * target-role-name = "BeanB-has-one-BeanA" | * | * @jboss.target-relation | * fk-column = <The column name in the table for BeanB> | * related-pk-field = <The BeanA cmp field name (primary key)> | */ | public abstract java.util.Collection getBeanBs(); | | | /** | * @ejb.interface-method | */ | public abstract void setBeanBs(java.util.Collection arg); | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837239#3837239 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837239 ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user