Graylin Kim created DBUTILS-113:
-----------------------------------
Summary: Add support for conversion of ResultSet strings to enums
in the BeanProcessor
Key: DBUTILS-113
URL: https://issues.apache.org/jira/browse/DBUTILS-113
Project: Commons DbUtils
Issue Type: Improvement
Reporter: Graylin Kim
Priority: Minor
When using commons-dbutils I frequently use enum values with corresponding enum
in the database. In this situation, using the BeanListHandler produces the
following exception causing me to write a custom bean handler for enum
conversion.
{quote}
Cannot set status: incompatible types, cannot convert java.lang.String to
gov.nysenate.openleg.util.Storage$Status Query: SELECT * FROM changelog WHERE
1=1 AND time >= ? AND time <= ? Parameters: [2013-07-24 00:00:00, 2013-07-26
23:59:59]
java.sql.SQLException: Cannot set status: incompatible types, cannot convert
java.lang.String to gov.nysenate.openleg.util.Storage$Status Query: SELECT *
FROM changelog WHERE 1=1 AND time >= ? AND time <= ? Parameters: [2013-07-24
00:00:00, 2013-07-26 23:59:59]
at
org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:350)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:288)
{quote}
It seems to me that commons-dbutils should be able to handle this conversion.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira