db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lionel PASQUIER" <lpasqu...@omnikles.com>
Subject RE: join and criterion
Date Wed, 28 Apr 2004 07:56:02 GMT
> 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


Mime
View raw message