|
Hi,
I'm trying to implement a 1 to many bidirectional
relationship with xdoclet
using the following tags and method
signatures-
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(); My ejb-jar.xml file is picking up the relationship,
but it's defining it as 1 to 1.
<ejb-relation > <ejb-relation-name>Reservations-Cruise</ejb-relation-name> <!-- bidirectional --> <ejb-relationship-role > <ejb-relationship-role-name>Cruise-has-reservations</ejb-relationship-role-name> <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
|
