Search code examples
javaibatis

iBatis using a set for a resultMap as well as a parameterMap


I want to pass a Set of Strings in an iBatis query for the parameter map as well as return a collection of strings for the result set.

Is this possible?

Example queries ...

SELECT * FROM some_table t WHERE t.some_column IN (values);

UPDATE some_table t SET t.some_column = 'some_value' WHERE t.other_column IN (values);

Walter


Solution

  • If you want to pass a List of Strings as one parameter, for example for building a IN(val1,val2...) query, then you should read about dynamic queries, in particular the Iterate element. See also.