Re: TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

"Alessandro Colantoni" <[email protected]> Tue, 25 Sep 2007 19:26:45 +0200
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi Hans
I think that in an other post I got mistake.

If you want all beginning with r you have to put RIGHTLIKE.
 when you use RIGHTLIKE just updated a criteria in this  way


criteria.addLike(field,value+"%");

with leftLike

criteria.addLike(field,"%"+value);

I hope this help
Regards
Alessandro



On 9/25/07, Hans Novak <[email protected]> wrote:
>
> Hi Allesandro,
>
> i have a question to the "LogicSqlCondition"
>
> When i ask mandragora with
>
>    Partner.class, new LogicSqlCondition("NAME","leftlike","r")
>
> i get not the object, whats beginnig with r, but one, who have an "r"
> somewhere in the name (and only 1 object, but there are more with "r" in
> the name).
>
> When i call it
>
>    Partner.class, new LogicSqlCondition("NAME","leftlike","r*")
>
> i get all object beginning with "r" and containig a "r" in the "NAME"
> Field.
>
> What i doing wrong ?
>
>
> Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>