ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Dynamic query woes.
Date Thu, 23 Mar 2006 23:48:07 GMT
Add remapResults="true" in the select tag.

There is a performance hit, but it will work.


On 3/23/06, Daniel Pitts <Daniel.Pitts@cnet.com> wrote:
> 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.

View raw message