ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts" <Daniel.Pi...@cnet.com>
Subject Dynamic query woes.
Date Thu, 23 Mar 2006 23:29:44 GMT
I have a very generic query which has different column names, depending
on what was passed to it.
<select id="query" resultClass="java.util.HashMap" parameterClass="map">
        SELECT $columns$ FROM $from$ WHERE $where$
</select>

It works fine the first time. And it even works fine if $columns$
doesn't change.  However, if $columns$ had (for instance) "my_column" in
one query, but then it had "another_column" in a later query, the last
query fail with "no such column 'my_column'"

Is this a bug, or a feature? Also, is there a work-around?
Thanks.

Mime
View raw message