I meant off course Criterion object.
/Colin
----- Original Message -----
From: "Colin Chalmers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Andrea Papotti"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 3:32 PM
Subject: Re: Another Criteria Help
> You'll probably have to use the Criteria object for this , there's a good
> example on the Turbine site.
>
> /Colin
>
> ----- Original Message -----
> From: "Andrea Papotti" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 25, 2001 3:32 PM
> Subject: Another Criteria Help
>
>
> > Hi, I'm here again...
> >
> > I have found no hint in the Turbine docs about this:
> >
> > How can I use Criteria to obtain a query like this
> >
> > Select A,B,C from TABLE where A='10' and (B='0' or C='0')
> >
> > I'm able to obtain only this query:
> >
> > Select A,B,C from TABLE where A='10' and B='0' or C='0'
> >
> > using:
> >
> > ...
> > Criteria criteria = new Criteria();
> > criteria.add(TablePeer.A,"10");
> > criteria.add(TablePeer.B,"0");
> > criteria.or(TablePeer.C,"0");
> > ...
> >
> > but this gets also records whith A!='10' but C='0'
> >
> > more generally, how can you use braces with Criteria
> >
> > TVMIA, Andrea
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]