Adam wrote:

I'm missing something really obvious in defining a 1:N unidirectional
relationship.  Can someone please show the correct tags to use, and where to
place them.  This is specifically for jboss, too, if that makes a
difference.

Parent Table:
------------------
parentID
name


Child Table
-----------------
childId
parentId
name


Since you said "unidirectional" I guess you want to get the children-objects from a known parent-object.
This means you have get-/set-methods only in Parent and nothing in Child.


   /**
    * @ejb.interface-method
    * @ejb.relation
    *     name="Parent-Child"
    *     role-name="1-Parent-n-Children"
    *     multiple="yes"
    *     target-role-name="n-Children-1-Parent"
    *     target-multiple="no"
    *     target-ejb="Child"
    * @jboss.target-relation
    *     fk-constraint="true"
    *     related-pk-field="parentId"
    *     fk-column="parentId"
    */
   public abstract java.util.Collection getChildren();
   /**
    * @ejb.interface-method
    */
   public abstract void setChildren(java.util.Collection child);




------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to