You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bob Arthur (Commented) (JIRA)" <ji...@apache.org> on 2012/02/13 18:35:03 UTC

[jira] [Commented] (DBUTILS-24) [dbutils] Modify BasicRowProcessor to use the column label

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

Bob Arthur commented on DBUTILS-24:
-----------------------------------

The MySQL documentation - http://dev.mysql.com/doc/refman/5.1/en/connector-j-installing-upgrading.html - states that returning aliases from getColumnName() is not JDBC-compliant, so as of v5.1 of their driver, returns table names, with aliases being returned by 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