Thank you very, very much!
---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

----- Original Message ----- 
From: "Jose Gonzalez Gomez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 10, 2003 1:04 AM
Subject: Re: [Xdoclet-user] Many to Many issue.


>
>     Mick,
>
>     Take out the target-whatever, this should only be used with
> unidirectional relations. You also must change the return type of
> getStartingLocationsAlert() from AlertLocal to Collection, if you want a
> 1 to n relation.
>
>     Regards
>     Jose
>
> Mick Knutson wrote:
>
> >I have an "AlertBean" that has a "(LocationBean)startingLocation" and an
> >"(LocationBean)endingLocation"
> >So a "LocationBean" can be assigned to many different "Alert"'s.
> >
> >But, the way I have it now, a LocationBean can only be assigned to one
(1)
> >startingLocation.
> >So, location a can _not_ be referenced by AlertA as well as AlertB.
> >
> >This is _NOT_ correct for what I need.
> >AlertA as well as AlertB can have LocationA as the startingLocation.
> >
> >Here is the relevant code to help me figure out what I have done wrong.
> >Thanks in advance for your help:
> >=========================
> >
> >AlertBean.java:
>
>---------------------------------------------------------------------------
-
> >----
> >    /**
> >     * Get all Location's for this alert.
> >     *
> >     * @ejb.interface-method
> >     *
> >     * @ejb.relation
> >     *       name="Alert-StartingLocation"
> >     *       role-name="alert-has-starting_location"
> >     *       target-ejb="Location"
> >     *       target-role-name="starting_location-belongs_to-many-alerts"
> >     *       target-multiple="no"
> >     *
> >     * @ejb.relation-table
> >     *       table-name="alert_startinglocation_rel"
> >     *       create-table="false"
> >     *       remove-table="false"
> >     *
> >     * @jboss.relation
> >     *       related-pk-field="locationId"
> >     *       fk-column="location_id"
> >     *       fk-constraint="false"
> >     *
> >     * @jboss.relation-mapping
> >     *       style="relation-table"
> >     *
> >     * @ejb.value-object
> >     *       aggregate="com.baselogic.yoursos.location.LocationDto"
> >     *       aggregate-name="StartingLocation"
> >     *       match="normal"
> >     *       members="com.baselogic.yoursos.location.LocationLocal"
> >     *       members-name="StartingLocation"
> >     *       relation="external"
> >     */
> >    public abstract LocationLocal getStartingLocation();
> >
> >    public abstract void setStartingLocation( LocationLocal
> >pLocationLocal );
> >
> >
> >LocationBean.java:
>
>---------------------------------------------------------------------------
-
> >----
> >    /**
> >     * Get the User for this Location
> >     *
> >     * @ejb.interface-method
> >     *
> >     * @ejb.relation
> >     *       name="Alert-StartingLocation"
> >     *       role-name="starting_location-belongs_to-many-alerts"
> >     *       target-ejb="Alert"
> >     *       target-role-name="alert-has-starting_location"
> >     *       target-multiple="yes"
> >     *
> >     * @ejb.relation-table
> >     *       table-name="alert_startinglocation_rel"
> >     *       create-table="false"
> >     *       remove-table="false"
> >     *
> >     * @jboss.relation
> >     *       related-pk-field="alertId"
> >     *       fk-column="alert_id"
> >     *       fk-constraint="false"
> >     *
> >     * @jboss.relation-mapping
> >     *       style="relation-table"
> >     **/
> > public abstract AlertLocal getStartingLocationsAlert();
> > public abstract void setStartingLocationsAlert( AlertLocal pAlert );
> >
> >
> >
> >---
> >Thanks
> >Mick Knutson
> >http://www.baselogic.com
> >
> >---
> >
> >
> >-------------------------------------------------------
> >This sf.net email is sponsored by:ThinkGeek
> >Welcome to geek heaven.
> >http://thinkgeek.com/sf
> >_______________________________________________
> >xdoclet-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to