[ 
https://issues.apache.org/jira/browse/IBATISNET-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gilles Bayon closed IBATISNET-274.
----------------------------------

       Resolution: Fixed
    Fix Version/s: DataMapper 3.0

in SVN

> Allow Multiple Resultset Queries to be appended to different lists
> ------------------------------------------------------------------
>
>                 Key: IBATISNET-274
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-274
>             Project: iBatis for .NET
>          Issue Type: Improvement
>    Affects Versions: DataMapper 1.6.1
>            Reporter: Michael Schall
>            Assignee: Gilles Bayon
>             Fix For: DataMapper 3.0
>
>
> Currently if I have a query that returns multiple resultsets, each object 
> returned is added to a single ArrayList.  
> <select id="GetMultipleResultMap" resultMap="account,category">
> select * from accounts
> select * from categories
> </select>
> IList list = sqlMap.QueryForList("GetMultipleResultMap", null);
> This will return a single list with n+m objects in it (n customers + m 
> categories).  
> I would like a way to get a list of lists. The returned object would be a 
> list with 2 objects in it (list of n Customers, list of m categories).  Which 
> would allow for the following code.
> IList list = sqlMap.QueryForList("GetMultipleResultMap", null);
> IList<Account> accountList = (IList<Account>) list[0];
> IList<Category> categoryList = (IList<Category>) list[1];
> In order to keep backwards compatibility we would need new syntax in the 
> resultMap attribute, possibly the following:
> <select id="GetMultipleResultMap" resultMap="account[],category[]">
> select * from accounts
> select * from categories
> </select>
> Also notice I would like the inner lists to be generic lists if possible.  We 
> can create the correct generic list type from the resultMap types.
> I posted a "quick and dirty" patch that breaks backwards compatibility on the 
> mailing list that shows what I'm thinking.
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg02307.html
> I would be willing to code the change and submit the patch if this is 
> something you think is worth while.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to