> it looks like you want to create an unidirectional 1-n relation. I think you
> should use the jboss.target-relation tag.
Thanks, I changed the jboss.relation to jboss.target-relation, but now
I get the following error:
org.jboss.deployment.DeploymentException: CMP field for key not found:
field name=CD, ObjectName:
jboss.j2ee:jndiName=AttendanceReasonBean,service=EJB
It's like it can't find the CD field in the AttendanceReasonBean.
Here's the XDoclet tags/code with the changes I made:
/**
* Returns the #1 reason the student attends
* @return the #1 reason the student attends
*
* @ejb.interface-method
*
* @ejb.relation
* name="Student-AttendanceReason"
* role-name="Student-has-AttendanceReason"
* target-ejb="AttendanceReason"
* target-role-name="AttendanceReason-belongs-to-Student"
* target-multiple="no"
*
* @jboss.target-relation
* fk-constraint="true"
* fk-column="ATTENDANCE_REASON_CD"
* related-pk-field="CD"
*/
public abstract AttendanceReasonLocal getAttendanceReason();
> > I am trying to set up a one to many relationship using XDoclet and
> > JBoss with eclipse. But I keep getting the following error when I try
[quoted text clipped - 79 lines]
> >
> > }
Michael Meyer - 06 Nov 2003 07:37 GMT
hi,
you have to map the columns of your databasetables and maybe your database
is case sensitive.
Michael
> > it looks like you want to create an unidirectional 1-n relation. I think you
> > should use the jboss.target-relation tag.
[quoted text clipped - 112 lines]
> > >
> > > }