[ 
https://issues.apache.org/jira/browse/BEANUTILS-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964601#action_12964601
 ] 

Brian P Connor commented on BEANUTILS-383:
------------------------------------------

If you are using 1.8.3 there is a new constructor that allows you to 
specify whether or not the column label should be used.

public RowSetDynaClass(ResultSet resultSet,
                        boolean lowerCase,
                        boolean useColumnLabel)
                 throws SQLException

By default, it is set to false.

-- 

Brian Connor



> `select name as foo_name' - > RowSetDynaClass detects false column name which 
> causes java.sql.SQLException: Column 'name' not found. 
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-383
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-383
>             Project: Commons BeanUtils
>          Issue Type: Bug
>    Affects Versions: 1.8.3
>         Environment: gentoo linux 64 bit
>            Reporter: Kfir Ozer
>
> Hello.
> If i have the following query:
> 'select game.name as game_name from games'
> and i use RowSetDynaClass to fetch a list of DynaBeans from the result set, i 
> get the following error:
>     ERROR c.x.xpofacebook.mysql.MysqlDb - stack trace: java.sql.SQLException: 
> Column 'name' not found.
> it seems that the RowSetDynaClass fetches the column names as their original 
> names and does not consider column names modification with the 'as' keyword.

-- 
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