Hello, Is there a way to
change a property value before it is plugged in to the select statement? <select id="search"
parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select ConsultantId, BlackListed, FirstName, LastName, HomeTelephone, EmailAddress, InterviewGrade, TotalYrsOfExp from Consultant
<dynamic
prepend=" where
">
<isNotEmpty property="FirstName" prepend="
and ">FirstName like #FirstName#</isNotEmpty>
<isNotEmpty property="LastName" prepend="
and ">LastName like #LastName#</isNotEmpty>
<isNotEmpty property="ActiveInactive" prepend="
and ">ActiveInactive like #ActiveInactive#</isNotEmpty> </dynamic>
order by FirstName, LastName
</select> For example, in
the above case, when FirstName is present, is there a
way to attach ‘%’ at the end of the FirstName’s
value and then perform the select operation? For some reason, in
the calling program, I won’t be able to attach ‘%’ at the end
of the search fields. Well, somehow I could achieve that before the iBatis call is made, but I’m kindof
hesitant to go with that approach. So I was wondering is there any way to
handle it in iBatis layer. Any help is highly appreciated. Thanks Nilesh |
- Re: change in property value inside <select/> Nilesh Bhattad
- Re: change in property value inside <select/&g... Kris Jenkins
- Re: change in property value inside <select/&g... Prashanth Sukumaran
- RE: change in property value inside <selec... Philippe Laflamme
- RE: change in property value inside <s... Prashanth Sukumaran
- RE: change in property value inside &... Philippe Laflamme
- Re: change in property value inside <select/&g... Brice Ruth
- RE: change in property value inside <select/&g... Chen, Tim
- RE: change in property value inside <selec... Philippe Laflamme
- RE: change in property value inside <s... Prashanth Sukumaran