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

Reply via email to