Alternatively add the '%' chars to your property just before calling
the mapper.
On Mar 6, 3:29 pm, Filipe Sousa <
[hidden email]> wrote:
> You can always call my_select_method("%" + lastName + "%")
>
>
>
>
>
>
>
> On Tuesday, March 6, 2012 12:23:19 PM UTC, vsk wrote:
>
> > I want to achieve Select * from patient where last_name like '%john%'
> > with mybatis 3.0.
>
> > I am using the following code but somehow doesn't seam to work as
> > expected and gets all the records.
> > select * from patient where last_name like '%'|| #{lastName} ||'%'.
>
> > Anyone aware of the solution?
>
> > Regards,
> > Sk