[ http://issues.apache.org/jira/browse/IBATISNET-73?page=comments#action_66371 ] Ron Grabowski commented on IBATISNET-73: ----------------------------------------
Now that I think about it, this would be more even more helpful: _logger.Debug("The statement [" + statement + "] was not able to auto map column [" + columnName + "] to a property on [" + resultObject.ToString() + "]"); That would require changing how some other things are done. I don't know if this is an easy/difficult fix. Just a wish... > 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