[ http://issues.apache.org/jira/browse/IBATISNET-170?page=all ]
Gilles Bayon closed IBATISNET-170. ---------------------------------- Resolution: Fixed In SVN > auto-result-map Bug > ------------------- > > Key: IBATISNET-170 > URL: http://issues.apache.org/jira/browse/IBATISNET-170 > Project: iBatis for .NET > Issue Type: Bug > Affects Versions: DataMapper 1.5 > Reporter: Gilles Bayon > Assigned To: Gilles Bayon > Fix For: DataMapper 1.5.1 > > > Are you aware that field names conflict with property names when automapping > columns? So a class written like: > public class Customer > { > private int id; > public int ID > { > get { return id; } > set { id = value; } > } > } > ... will cause iBATIS.NET to fail with: > CustomerRepositoryTest.ShouldGetCustomerByID : > IBatisNet.DataMapper.Exceptions.DataMapperException : Error automapping > columns. Cause: Item has already been added. Key in dictionary: 'ID' Key > being added: 'ID' > ----> System.ArgumentException : Item has already been added. Key in > dictionary: 'ID' Key being added: 'ID' -- 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