The @ejb.relation tag must be on the accessor methods. -On getReservations()

(Please send plain text email).

HTH,
Aslak

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joe Milora
Sent: 20. januar 2003 18:43
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] 1 to many bidirectional relationship


Hi,
I'm trying to implement a 1 to many bidirectional relationship with xdoclet
using the following tags and method signatures.
The ejb-jar.xml file is picking up the relationship, but it's defining it as
1 to 1.

Reservation class -
 /**
     *@ejb:interface-method view-type="local"
     *@ejb:relation name="Reservations-Cruise"
     *              role-name="Reservations-have-cruise"
     */
    public abstract void setCruise(CruiseLocal cruise);
    /**
     *@ejb:interface-method view-type="local"
     */
    public abstract CruiseLocal getCruise();


Cruise class -
    /**
     *@ejb:interface-method view-type="local"
     *@ejb:relation name="Reservations-Cruise"
     *              role-name="Cruise-has-reservations"
     *
     */
     public abstract void setReservations(java.util.Collection
reservations);
     /**
      *@ejb:interface-method view-type="local"
      */
     public abstract java.util.Collection getReservations();


<ejb-relation >
<ejb-relation-name>Reservations-Cruise</ejb-relation-name>
<!-- bidirectional -->
<ejb-relationship-role >
<ejb-relationship-role-name>Cruise-has-reservations</ejb-relationship-role-n
ame>
<multiplicity>One</multiplicity>
<relationship-role-source >
<ejb-name>Cruise</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>reservations</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role >
<ejb-relationship-role-name>Reservations-have-cruise</ejb-relationship-role-
name>
<multiplicity>One</multiplicity>
<relationship-role-source >
<ejb-name>Reservation</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>cruise</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
Does anyone know what I'm missing?
thanks,
Joe Milora



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to