-
1. CMR 1:n Xdoclet Sample
sheckler Nov 27, 2002 10:56 AM (in response to sheckler)Help!!
I need some sample source code for CMR 1:n relation deployment with XDoclet. I spent lots of time to figure it out, but it still does not work.
Here is my code in the "one" entity, which results in the following error on deployment: "Mappings were not provided for all fields: unmaped fields=...."
/**
*
* @ejb:relation
* name="Role-Users"
* role-name="Role-has-Users"
* target-role-name="User-belongs-to-Role"
* target-ejb="Principals"
* target-multiple="no"
*
* @jboss:relation-mapping style="foreign-key"
*
*
* @jboss:relation fk-constraint="true"
* @jboss:target-relation
* related-pk-field="principalId"
* fk-column="PRINCIPAL_FK"
*/
public abstract Set getPrincipalsforRole();
public abstract void setPrincipalsforRole(Set principals);
in the "many" Entity I just wrote
"
public abstract RolesLocal getRole();
public abstract void setRoles(RolesLocal role);
"
Can someone help me?
Stefan Heckler