ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From somebody <vasantha.rap...@gmail.com>
Subject Problem with isEqual in select clause
Date Tue, 30 Dec 2008 12:14:49 GMT


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"
	Select a,b,c
	<isEqual property="type" compareValue="C" > 
	<isEqual property="type" compareValue="B" > 
	From A,B

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
Its not taking the parameter 'type' dynamically. I will be thankful, if you
can give any inputs to resolve this issue.

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.

View raw message