You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2012/07/20 21:35:37 UTC

[jira] [Closed] (DBUTILS-84) BeanProcessor method processColumn should take SQLXML in consideration

     [ https://issues.apache.org/jira/browse/DBUTILS-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi closed DBUTILS-84.
---------------------------------


1.5-RC released
                
> BeanProcessor method processColumn should take SQLXML in consideration
> ----------------------------------------------------------------------
>
>                 Key: DBUTILS-84
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-84
>             Project: Commons DbUtils
>          Issue Type: Improvement
>    Affects Versions: 1.4
>         Environment: Windows 7 + IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32 jvmwi3260sr9-20110216_75791 (JIT enabled, AOT enabled)
>            Reporter: Tiago Cavaleiro
>            Assignee: William R. Speirs
>            Priority: Minor
>              Labels: SQLXML, sqlserver
>             Fix For: 1.5
>
>         Attachments: BeanProcessor.java
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> I was experimenting DbUtils and discovered that if the result set contains a SQLXML column using the BeanProcessor the returned type will be a String and not a java.sql.SQLXML.
> Part of the problem is related with the fact the SQL Server driver returns a String. 
> The call to ResultSet.getObject([SQLXML index]) is returning a String instead of the java.sql.SQLXML, but if we call the ResultSet.getSQLXML([SQLXML index]) it works as expected.
> The correction I've made on the DbUtils was to add the following code:
> {code:title=BeanProcess.java|borderStyle=solid}
>     protected Object processColumn(ResultSet rs, int index, Class<?> propType)
>         throws SQLException {
>         (...)
>         
>         } else if (propType.equals(SQLXML.class)) {
>         	return rs.getSQLXML(index);
>             
>         } else {
>             return rs.getObject(index);
>         }
> {code}

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