Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0
-
None
Description
MetaDataColumnDescriptor.readColumn() currently attempts to find the column index of a column before retrieving it from the ResultSet in order for it to return the default value if the column does not exist. Some JDBC implementations (e.g. IBM's DB2 JCC4 driver) have broken ResultSetMetaData implementations however, which do not return the correct columns names.
By attempting to retrieve the columns by name iso index before retrieving the ResultSetMetaData we avoid hitting these broken paths in the general case. It has the added benefit of not having to retrieve the result set meta data for each column read, which may be potentially harmful to the performance.
I'm attaching a patch which implements this behavior.