When using implicit resultmap, the code fails throwing exception "Undefined 
Column Name"
----------------------------------------------------------------------------------------

                 Key: IBATIS-490
                 URL: https://issues.apache.org/jira/browse/IBATIS-490
             Project: iBatis for Java
          Issue Type: Bug
    Affects Versions: 2.3.0
         Environment: Windows XP, JDK 1.6, IBatis 2.3, DB2 database on AS400
            Reporter: Rikki Bindra


Hi,

I am using the jt400.jar as the JDBC Driver for accessing data from DB2 
database on AS400. The problem is that I want to use implicit resultmap like 

<select id="getProductCount" resultClass="java.util.HashMap">
select * from PRODUCT
</select>

However, the problem is that while populating the HashMap, I have noticed that 
the class "com.ibatis.sqlmap.engine.mapping.result.AutoResultMap" uses method 
getColumnLabel() on ResultSetMetaData
My JDBC driver returns the label of the column (containing spaces and which is 
different than the column name in database). Now the code fails reporting the 
exception that "Invalid Column Name" has been specified. The problem is in the 
class "com.ibatis.sqlmap.engine.mapping.result.AutoResultMap" as it should be 
calling getColumnName() instead of getColumnLabel() on ResultSetMetaData to get 
the names of the columns.

Please look this ASAP. Looking for a solution at the earliest.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to