[ http://issues.apache.org/jira/browse/IBATISNET-114?page=comments#action_12330105 ]
Ron Grabowski commented on IBATISNET-114: ----------------------------------------- System.IndexOutOfRangeException : FirstName at IBatisNet.DataMapper.TypeHandlers.StringTypeHandler.GetValueByName(ResultProperty mapping, IDataReader dataReader) in \IBatisNet.DataMapper\TypeHandlers\StringTypeHandler.cs:line 54 at IBatisNet.DataMapper.Configuration.ResultMapping.ResultProperty.GetDataBaseValue(IDataReader dataReader) in \IBatisNet.DataMapper\Configuration\ResultMapping\ResultProperty.cs:line 310 at IBatisNet.DataMapper.MappedStatements.ReaderAutoMapper.AutoMapReader(IDataReader reader, Object& resultObject) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 1170 at IBatisNet.DataMapper.MappedStatements.MappedStatement.AutoMapReader(IDataReader reader, Object& resultObject) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 1085 at IBatisNet.DataMapper.MappedStatements.MappedStatement.ApplyResultMap(RequestScope request, IDataReader reader, Object resultObject) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 297 at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForList(RequestScope request, IDalSession session, Object parameterObject, Int32 skipResults, Int32 maxResults, RowDelegate rowDelegate) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 552 at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(IDalSession session, Object parameterObject, Int32 skipResults, Int32 maxResults) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 503 at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(IDalSession session, Object parameterObject) in \IBatisNet.DataMapper\MappedStatements\MappedStatement.cs:line 486 at IBatisNet.DataMapper.SqlMapper.QueryForList(String statementName, Object parameterObject) in \IBatisNet.DataMapper\SqlMapper.cs:line 740 > Add support for Java's remapResults="true" > ------------------------------------------ > > Key: IBATISNET-114 > URL: http://issues.apache.org/jira/browse/IBATISNET-114 > Project: iBatis for .NET > Type: Bug > Reporter: Ron Grabowski > Assignee: Gilles Bayon > Priority: Minor > > // DynamicTest.cs > [Test] > public void TestDynamicSqlOnColumnSelection() > { > Account paramAccount = new Account(); > Account resultAccount = new Account(); > IList list = null; > paramAccount.LastName = "Dalton"; > list = sqlMap.QueryForList("DynamicSqlOnColumnSelection", paramAccount); > resultAccount = (Account)list[0]; > Console.WriteLine("FirstName: [{0}]", resultAccount.FirstName); > AssertAccount1((Account) list[0]); > Assert.AreEqual(5, list.Count); > paramAccount.LastName = "Bayon"; > list = sqlMap.QueryForList("DynamicSqlOnColumnSelection", paramAccount); > resultAccount = (Account)list[0]; > // should be null > Console.WriteLine("FirstName: [{0}]", resultAccount.FirstName); > AssertAccount1(resultAccount); > Assert.AreEqual(5, list.Count); > } > <!-- populate certain fields based on the parameterObject --> > <statement > id="DynamicSqlOnColumnSelection" > parameterClass="Account" > resultClass="Account"> > SELECT > Account_ID as Id, > <isEqual property="LastName" compareValue="Dalton" > > Account_FirstName as FirstName, > </isEqual> > <isEqual property="LastName" compareValue="Dalton" > > Account_LastName as LastName, > </isEqual> > Account_Email as EmailAddress > FROM > Accounts > </statement> -- 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
