Cache key for accessors can be ambiguous and can cause cast exceptions
----------------------------------------------------------------------
Key: IBATISNET-198
URL: http://issues.apache.org/jira/browse/IBATISNET-198
Project: iBatis for .NET
Issue Type: Bug
Components: DataMapper
Reporter: Bruno Silva
Example:
If we have a class "Product" with a property "DefinitionId" and a class
"ProductDefinition" with a property "Id", the cache key will be the same for
both properties. This will make the DataMapper return always the first property
that was configured.
The problem is the line:
string key = targetType.FullName + "." + name;
in GetAccessorFactory.cs and CreateAccessorFactory.cs.
Changing it to:
string key = targetType.FullName + "." + name;
will solve the problem.
--
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