Hi Hani,
I know(discovered) I cannot have both tags. I already have the ejb.relation tags
as all my relationships are bidirectional right now. My problem is that with
just those tags, the orion module doesn't do anything to add information,
regarding the relationships, to the orion-ejb-jar.xml, so Orion does not know
which fields to use for them.
Let's see: if I have two tables like that:
T_A(A_ID, A_NAME);
T_B(B_ID, B_NAME, B_A_ID);
with a 1-N bidrectional relationship using B_A_ID as FK in T_B, what is the
supposed way to describe that so Orion automatically handles that relationship?
If you don't add some info on orion-ejb-jar.xml, how does orion guess that the
FK field is B_A_ID? So far, for Resin, what I used to do is the following:
//On TB entity
   /**
   * @ejb:interface-method view-type="local"
   * @ejb:relation
   *    name="t_b-t_a"
   *    role-name="t_b-has-t_a"
   * @resin-ejb:relation sql-column="B_A_ID"
   */
  public abstract pkg.TALocal getTA();
//on TA
  /**
   * @ejb:interface-method view-type="local"
   * @ejb:relation
   *    name="t_b-t_a"
   *    role-name="t_a-has-t_bs"
   */
  public abstract java.util.Collection getTB();

All that the resin module needs is the FK SQL column, as he can guess the rest
by looking at both sides of the relationship. How does one do that with Orion?
Thank you very much for your help, Hani,
regards,
D.

> You need to declare the target ejb tags if it's unidirectional, or add 
> relation tags to the target field if it's bidirectional.
> 
> You cannot have a field have both a ejb.relation tag and a 
> ejb.persistence tag (spec doesn't allow it, nothing to do with orion)
> 
> On Saturday, June 28, 2003, at 07:19 AM, Daniel Lopez wrote:
> 
> > Hi again,
> > Now I'm stucked :(. If I have a relationship method and I add the
> > @ejb:persistent-field to that method, then Orion complains that I have 
> > the
> > related field declared both as cmp and cmr, which is right as it gets 
> > declared
> > twice. However, if I don't put it, then no information is added to the
> > orion-ejb-jar.xml file regarding the relationship and then Orion 
> > complains he
> > cannot find the match on the other side of the relationship, which is 
> > also
> > correct as he cannot guess the right name of the property.
> > Any ideas? Can this be done or is this not supported yet through the
> > xdoclet-orion module?
> > Thanks,
> > D.


--
This message was sent using Sake Mail, a web-based email tool from
Endymion Corporation.  http://www.endymion.com/products/sake
You need to declare the target ejb tags if it's unidirectional, or add relation tags to the target field if it's bidirectional.

You cannot have a field have both a ejb.relation tag and a ejb.persistence tag (spec doesn't allow it, nothing to do with orion)

On Saturday, June 28, 2003, at 07:19 AM, Daniel Lopez wrote:

Hi again,
Now I'm stucked :(. If I have a relationship method and I add the
@ejb:persistent-field to that method, then Orion complains that I have the
related field declared both as cmp and cmr, which is right as it gets declared
twice. However, if I don't put it, then no information is added to the
orion-ejb-jar.xml file regarding the relationship and then Orion complains he
cannot find the match on the other side of the relationship, which is also
correct as he cannot guess the right name of the property.
Any ideas? Can this be done or is this not supported yet through the
xdoclet-orion module?
Thanks,
D.


--
This message was sent using Sake Mail, a web-based email tool from
Endymion Corporation. http://www.endymion.com/products/sake<Original message>



------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to