[ 
https://issues.apache.org/jira/browse/DBUTILS-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154240#comment-13154240
 ] 

Daniel Xiaodan Zhou commented on DBUTILS-24:
--------------------------------------------

I have this problem too with MySQL driver.

JDK6 documentation says "Gets the designated column's suggested title for use 
in printouts and displays. The suggested title is usually specified by the SQL 
AS clause. If a SQL AS is not specified, the value returned from getColumnLabel 
will be the same as the value returned by the getColumnName method." 
--http://download.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel(int)

I do think it should be changed to use getColumnLabel().

                
> [dbutils] Modify BasicRowProcessor to use the column label
> ----------------------------------------------------------
>
>                 Key: DBUTILS-24
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-24
>             Project: Commons DbUtils
>          Issue Type: Improvement
>         Environment: Operating System: other
> Platform: Other
>            Reporter: gene
>            Priority: Minor
>
> BasicRowProcessor.mapColumnsToProperties currently uses 'getColumnName' to 
> determine what property to set on the bean. It would be more flexible if it 
> used 'getColumnLabel'. This would allow the developer to specify the property 
> name as an alias to a column in the sql query.
> For example 'select last_name lastname, first_name firstname from employee'. 
> Note that 'getColumnLabel' will defaults to the column name if no alias is 
> specified in the query.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to