You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Lionel PASQUIER <lp...@omnikles.com> on 2004/04/30 11:20:44 UTC
bug? Was: join and criterion
Hello!
So, no one has any idea of how to solve my problem?
I suppose the join sentence I got back with the criteria.JOIN is a bug, or might not yet be supported...
Could someone help about this?
> -----Message d'origine-----
> De : Lionel PASQUIER
> Envoyé : mercredi 28 avril 2004 09:56
> À : Apache Torque Users List
> Objet : RE: join and criterion
>
>
> > instead of Criteria.and try Criteria.addJoin or use
> > Criteria.JOIN instead of Criteria.EQUAL as SQL-Comparator.
>
> Hello Florian,
>
> Did you use the Criteria.JOIN successfully?
> As stated in my first email, I tried to use the Criteria.JOIN
> (check below). And it gave me a bad sql sentence.
> Also, AddJoin does not take Criterion as parameter, so I
> could not use it.
>
> Any more ideas? Is the resulting sentence with Criteria.JOIN a bug?
>
>
> > > If I replace the Criteria.EQUAL by a Criteria.JOIN for the
> > > joinXX_X Criterion, it is even weirder:
> > > SELECT DISTINCT B.IDB
> > > FROM B, A, AB, C, CB WHERE
> > > (
> > > (
> > > A.IDversion IN ('16','15') AND B.IDBJOIN'AB.IDB' AND
> > > AB.IDA JOIN 'A.IDA'
> > > )
> > > OR
> > > (
> > > C.IDversion IN ('16','15') AND B.IDBJOIN'CB.IDB' AND CB.IDC
> > > JOIN 'C.IDC'
> > > )
> > > )
> > > (the JOIN sticked to B.IDB and 'CB.IDB' is not an error of
> > > cut/paste...)
> > > Does anyone can help?
> > > I am using Torque 3.1 .
> > >
> > > PS: if you managed to survive this email; I have a precision: at
> > > the end I'd may have a specific IDB that I want to include to the
> > > request like:
> > > Criteria.Criterion idBCrit = crit.getNewCriterion(BPeer.IDB ,
> > > getIdB(), Criteria.EQUAL);
> > > crit.add(
> > > ( (AIdVersion.and(joinBA_B).and(joinAA_B)
> > > ).or(CIdVersion.and(joinBC_B).and(joinCC_B))
> > > ).and(idBCrit)
> > > );
> > >
> > >
> > >
> -------------------------------------------------------------------
> > > --
> > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: torque-user-help@db.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org