[ 
http://issues.apache.org/jira/browse/IBATISNET-73?page=comments#action_66378 ]
     
Roberto Rabe commented on IBATISNET-73:
---------------------------------------

I'll take a look at it.

> Error automapping columns. Cause: IBatisNet.Common.Exceptions.ProbeException: 
> There is no Set property named '' in class...
> ---------------------------------------------------------------------------------------------------------------------------
>
>          Key: IBATISNET-73
>          URL: http://issues.apache.org/jira/browse/IBATISNET-73
>      Project: iBatis for .NET
>         Type: Bug
>     Reporter: Ron Grabowski
>     Assignee: Roberto Rabe
>      Fix For: DataMapper 1.2

>
> If a resultClass is specified and a column is returned from the database that 
> does not match a property of the resultClass, an exception is thrown but the 
> name of the non-mapped column does not appear in the error message. This code 
> in IBatisNet.DataMapper.MappedStatements+ReaderAutoMapper:
>  // Set TypeHandler
>  Type propertyType = reflectionInfo.GetSetterType(property.PropertyName);
>  property.TypeHandler = typeHandlerFactory.GetTypeHandler( propertyType );
> could be changed to this:
> if (property.PropertyName != null && property.PropertyName.Length > 0)
> {
>  // Set TypeHandler
>  Type propertyType = reflectionInfo.GetSetterType(property.PropertyName);
>  property.TypeHandler = typeHandlerFactory.GetTypeHandler( propertyType );
> }
> else
> {
>  if (_logger.IsDebugEnabled)
>  {
>   _logger.Debug("The column [" + columnName + "] could not be auto mapped to 
> a property on [" + resultObject.ToString() + "]");
>  }
> }
> We all know how much I would enjoy seeing that log message :) I think it 
> would be a big help in tracking down typos. I think the Java version silently 
> ignores the case and does not print anything to the logs.
> Thanks to Larry for encountering this bug again so it could be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to