[ 
http://issues.apache.org/jira/browse/IBATISNET-87?page=comments#action_12320700 
] 

Ron Grabowski commented on IBATISNET-87:
----------------------------------------

Apparently this overload isn't supported in the Java version:

 UserCollection userCollection = new UserCollection();
 sqlMapper.QueryForList("User.GetMany", null, userCollection);
 return userCollection;

Even with the recent rounds of fixes, I still can't think of a way to 
efficiently populate the passed in object without getting an IList out of the 
cache and re-iterating through it to populate the passed in object.

My vote is for depreciating the method and eventually removing it.

> 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