Try,
<select id="searchQuery" resultClass="java.util.HashMap"
parameterClass="java.util.Map" remapResults="true">
Select a,b,c
<isEqual property="type" compareValue="C" >
,d
</isEqual>
<isEqual property="type" compareValue="B" >
,f
</isEqual>
From A,B
</select>
Regards,
Rikki Bindra
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
somebody <[email protected]>
12/30/2008 05:44 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
Problem with isEqual in select clause
Hi,
We are using Ibatis with Spring Framework. My requirement is...
I should make a query dynamically based on a parameter..Lets say 'type'
I have put the parameter type in a map(HashMap).
Please find below the query:
<select id="searchQuery" resultClass="java.util.HashMap"
parameterClass="java.util.Map">
Select a,b,c
<isEqual property="type" compareValue="C" >
,d
</isEqual>
<isEqual property="type" compareValue="B" >
,f
</isEqual>
From A,B
</select>
Now,the problem is...If I give type as 'C' for the first time..the select
clause works fine...
Even if I give type as 'B' also..its selecting the columns as if the type
is
'C'.
Its not taking the parameter 'type' dynamically. I will be thankful, if
you
can give any inputs to resolve this issue.
Regards,
vijay
--
View this message in context:
http://www.nabble.com/Problem-with-isEqual-in-select-clause-tp21216463p21216463.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
ForwardSourceID:NT0000AEBA
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you