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.

Reply via email to