ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffgbut...@gmail.com
Subject Re: Complex Abator Query
Date Wed, 13 Aug 2008 13:59:44 GMT
What you're experiencing is really a limitation in iBATIS 2 dynamic
SQL. The legacy generator generated *a lot* of code and still was
pretty limited in function. The new generators generate better code
IMHO, and you really can create very flexible WHERE clauses. There are
still some inefficiencies as you've seen. But I believe that the new
generators are the best option, given the limitations of iBATIS 2.

I have high hopes for better, more flexible, options when iBATIS 3
becomes available.

Jeff Butler

On 8/13/08, Ibatis534 <ibatis@mailinator.com> wrote:
>
> Thanks.
>
> Can I make a feature request that enables Example Classes to construct
> queries in a more dynamic way. It would be nice to be able to combine
> clauses as either 'OR' or 'AND' like
>
>
> criteria1 = example.createCriteria().andField1EqualTo(testValue);
> criteria2 = example.createCriteria().andField2IEqualTo(testValue2);
>
> example.andCriteria(criteria1);
> if(testValue3 > 5)
>     example.andCriteria(criterial2);
> else
>     example.orCriteria(criterial2);
>
>
> I guess I'm looking for some way to combine the power of the Java5 Generator
> with the flexibility of the Legacy Generator.
> --
> View this message in context:
> http://www.nabble.com/Complex-Abator-Query-tp18937755p18957341.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message