On Fri, Oct 2, 2009 at 9:40 PM, Clinton Begin <clinton.be...@gmail.com> wrote:
> Unfortunately, by coincidence, I'm currently rewriting the entire
> DefaultResultSetHandler -- in a serious way.  It's currently in a real state
> of flux.
> I'll work on it this weekend some more to try to get it to a Beta 4.  Your
> feedback will come in handy for sure.

I can see a number of commits from this weekend - seems you have been busy!

However, from reviewing the changes, it looks as though I'll still
have the problems I described: loadMappedAndUnmappedColumnNames adding
mixed case column names to a list, and applyPropertyMappings searching
for the upper-cased name.

The only case sensitivity issues I saw addressed affected SqlRunner.
I'll check tomorrow to be sure, though.

Cheers
Martin


> On Fri, Oct 2, 2009 at 12:56 PM, Martin Ellis <mar...@ellis.name>
>> There
>> seems to be a case sensitivity issue in
>> DefaultResultSetHandler#getRowValue().
>>
>> It calls loadMappedAndUnmappedColumnNames, which
>> populates two lists with (uncapitalised) column names.
>> This is then passed to applyPropertyMappings, which
>> searches the same lists for upper-cased column names:
>>
>>   if (propertyMapping.isCompositeResult()
>>     || (column != null &&
>> mappedColumnNames.contains(column.toUpperCase()))) {
>>
>>
>> I've got stuff working as I'd like with the following change:
>>
>> ---
>> a/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java
>> +++
>> b/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java
>> @@ -265,9 +265,9 @@ public class DefaultResultSetHandler implements
>> ResultSetHandler {
>>       final String columnName = configuration.isUseColumnLabel() ?
>> rsmd.getColumnLabel(i) : rsmd.getColumnName(i);
>>       final String upperColumnName = columnName.toUpperCase();
>>       if (mappedColumns.contains(upperColumnName)) {
>> -        mappedColumnNames.add(columnName);
>> +        mappedColumnNames.add(upperColumnName);
>>       } else {
>> -        unmappedColumnNames.add(columnName);
>> +        unmappedColumnNames.add(upperColumnName);
>>       }
>>     }
>>   }

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to