[ http://issues.apache.org/jira/browse/IBATISNET-87?page=comments#action_12315447 ]
Ron Grabowski commented on IBATISNET-87: ---------------------------------------- If the public method changed to this: ExecuteQueryForList(string statementId, object parameterObject, Type listResultObject ) It would be the same as if you had used a listClass attribute on the <select>. Caching could be enabled. One of the benefits of passing in an existing IList is that you don't have to pay the penalty of calling Activator.CreateInstance at runtime. > MappedStatement.ExecuteQueryForList(IDalSession session, object > parameterObject, IList resultObject ) ignores all cache settings > -------------------------------------------------------------------------------------------------------------------------------- > > Key: IBATISNET-87 > URL: http://issues.apache.org/jira/browse/IBATISNET-87 > Project: iBatis for .NET > Type: Bug > Components: DataMapper > Reporter: Ron Grabowski > Priority: Critical > > The first two lines of the method are: > RequestScope request = _statement.Sql.GetRequestScope(parameterObject, > session); > using ( IDbCommand command = _preparedCommand.Create( request, session, > this.Statement, parameterObject )) > The first two lines should be along the lines of: > RequestScope request = _statement.Sql.GetRequestScope(parameterObject, > session); > if (_statement.CacheModel == null) > All of the overloaded ExecuteQueryForList methods call through to > RunQueryForList . > All of the overloaded ExecuteQueryForObject methods call through to > RunQueryForObject. > All of the overloaded ExecuteQueryForMap methods call through to > RunQueryForMap. > I looked in ViewCVS and it looks like the method has been incorrect since May > 2004. > There aren't any unit tests for this style of QueryForList: > UserCollection userCollection = new UserCollection(); > sqlMapper.QueryForList("User.GetMany", null, userCollection); > return userCollection; -- 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