Don't forget, at least in the case of jboss, using the jboss.relation vs jboss.target-relation, you indicate which is the source and which is the destination.

with jboss.relation:
  the related-pk-field refers to the pk field in the *other* bean
 and fk-column refers to the column that will be created in *this* dataset.

with jboss.target-relation:
  the related-pk-field refers to the pk field of *this* bean
 and the fk-column refers to the fk in the *other* dataset

don't know how this works with other app servers, as I haven't used them, so your mileage may vary.. but I'm guessing it works the same.


cheers!


--adam



From: Jean-philippe VIGNIEL <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [Xdoclet-user] Pb with *:1 relationship (Thanks)
Date: Fri, 18 Jul 2003 09:08:31 +0200

Thanks very much for your help. Your solution is not very intuitive but It works:)
To resume the thread for the next person who needs for a n-1 relation.:


1-1 relation:

         /**       @ejb.relation
          *     name = "Source-Target"
          *     role-name = "Source"
          *
          *     target-ejb = "Target"
          *     target-role-name = "Target"
          *   /
       public abstract Target getTarget();
       public abstract void setTarget(Target target)

1-n relation:


/** @ejb.relation * name = "Source-Target" * role-name = "Source" * * target-ejb = "Target" * target-role-name = "Target" * targte-multiple = "yes" * / public abstract Collection getTarget(); public abstract void setTarget(Collection target)

And the n-1 relation which is not very logical:)


/** @ejb.relation * name = "Source-Target" * role-name = "Source" * * target-ejb = "Target" * target-role-name = "Target" * target-multiple = "yes" * / public abstract Target getTarget(); public abstract void setTarget(Target target)

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to