-
1. Re: M-N relationship error -xdoclet
fnarz Sep 23, 2002 10:10 AM (in response to vbatista)AFAIK the XDoclet Tag should look something like this:
* @jboss:target-relation related-pk-field="id"
* fk-column="userBean_id"
Take a look at the samples in:
%XDOCLET_HOME%\samples\src\java\test\ejb\cmr\
Regards
Thimo -
2. Re: M-N relationship error -xdoclet
vbatista Sep 23, 2002 3:38 PM (in response to vbatista)Hello!
Thanks for your reply!
My new settings are:
UserBean:
#####
@ejb:relation name="User-Role"
role-name="User-Has-Many-Roles"
@jboss:relation-table table-name="xpto"
@jboss:target-relation related-pk-field="id"
fk-column="roleid"
#####
where "id" is the name of the primary key on the Role bean
and "roleid" is the name of the column in the relation table (xpto).
RoleBean:
#####
@ejb:relation name="User-Role"
role-name="Role-Has-Many-Users"
@jboss:relation-table table-name="xpto"
create-table="true"
remove-table="true"
@jboss:target-relation related-pk-field="id"
fk-column="userid"
#####
where "id" is the name of the primary key on the User bean
and "userid" is the name of the column in the relation table (xpto).
I am using jboss3.0.0 with bundled tomcat 4.0.3. I am also using xdoclet 1.1.2. I have read on this forum that someone had to upgrade xdoclet form cvs to a newer version. Can any one confirm this?
Any help would be welcome.
Thanks in advance,
Victor Batista