You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ryan Shelley <12...@gmail.com> on 2008/03/19 01:11:11 UTC
Abator Example Class Criteria Question
I need to generate a WHERE Clause like:
...WHERE field1 = 'foobar' AND (field2 = 'foo' OR field3 = 'bar')
I'm having some trouble working this through with the Example classes
generated by Abator, so I thought I'd ask if it's possible.
Thanks!
-Ryan
Re: Abator Example Class Criteria Question
Posted by Ryan Shelley <12...@gmail.com>.
Ah, that makes sense. I've got about 20 OR'ed criteria elements and one
AND'ed element, but it should work out ok. Thanks for the insight!
-Ryan
On Tue, Mar 18, 2008 at 5:23 PM, Jeff Butler <je...@gmail.com> wrote:
> This is an exercise in boolean algebra :)
>
> You can do this (equivalent) in Abator's example classes:
>
> where (field1 = 'foobar' and field2 = 'foo') or (field1 = 'foobar' and
> field3 = 'bar')
>
> Jeff Butler
>
>
>
> On Tue, Mar 18, 2008 at 7:11 PM, Ryan Shelley <12...@gmail.com>
> wrote:
>
> > I need to generate a WHERE Clause like:
> >
> > ...WHERE field1 = 'foobar' AND (field2 = 'foo' OR field3 = 'bar')
> >
> > I'm having some trouble working this through with the Example classes
> > generated by Abator, so I thought I'd ask if it's possible.
> >
> > Thanks!
> >
> > -Ryan
> >
>
>
Re: Abator Example Class Criteria Question
Posted by Jeff Butler <je...@gmail.com>.
This is an exercise in boolean algebra :)
You can do this (equivalent) in Abator's example classes:
where (field1 = 'foobar' and field2 = 'foo') or (field1 = 'foobar' and
field3 = 'bar')
Jeff Butler
On Tue, Mar 18, 2008 at 7:11 PM, Ryan Shelley <12...@gmail.com>
wrote:
> I need to generate a WHERE Clause like:
>
> ...WHERE field1 = 'foobar' AND (field2 = 'foo' OR field3 = 'bar')
>
> I'm having some trouble working this through with the Example classes
> generated by Abator, so I thought I'd ask if it's possible.
>
> Thanks!
>
> -Ryan
>