> > How do I do something like this with a Criteria...
> > 
> > select * from table where columnA='foo' OR columnA='bar'
> 
> for this particular case:
> 
> String[] values = new String[2];
> values[0]="foo";
> values[1]="bar";
> ...
> Criteria crit = new Criteria();
> crit.addIn(...Peer.columnA, values);

Of course, this won't cut it for such cases as:

  where (c1 < 'A' or c2 > 'B') and
        (c3 < 'C' or c4 > 'D') and
        (c5 < 'E' or c6 > 'F');

> AFAIK there is no general-purpose way to create OR 
> in Criteria other than running two separate queries.

What would it take to add OR support for Criteria? Is
this an inherent limitation in the Criteria class design?
If anybody can give me pointers, I could try a stab at this.

> fedor.


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to