You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Atif Faridi <af...@gmail.com> on 2005/09/23 16:27:11 UTC

Re: Result map problems...

I just came across the same problem. Another solution is to simply
alias the names of the dynamically generated columns. The aliases
should not be dynamically generated.

So,

    <select id="FetchColumnValue"
            resultClass="java.lang.Long"
            parameterClass="java.lang.String">
        select column$columnNameSuffix$ from testtable
    </select>

will result in the same unrecognized column error.

It could be changed to

    <select id="FetchColumnValue"
            resultClass="java.lang.Long"
            parameterClass="java.lang.String">
        select column$columnNameSuffix$ as columnAlias from testtable
    </select>

and work as expected without having to set the remapResults attribute to "true".

Atif Faridi