ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miika Mäkinen" <mmi...@gmail.com>
Subject Multiple resultsets in data mapper
Date Thu, 24 May 2007 02:49:28 GMT
Hi All,
I'm just getting into iBatis, and I'd like to if it can handle multiple
resultsets (.Net 2.0, Sql Server 2005)

For example, I'd have an objects like (pseudo-code):

class Company
    int Id;
    string Name;
    List<Classification> Classifications;

class Classification
   int Id;
   string Name;

And a stored procedure would return 2 resultssets:

SELECT CompanyId, CompanyName FROM Company;
SELECT CompanyId, ClassificationId, ClassificationName FROM
CompanyClassification INNER JOIN Classification ON
CompanyClassification.ClassificationId=Classification .ClassificationId;

Can I some how map the 2nd returned table into "List<Classification>
Classifications" inside  my "Company" object?

Miika Mäkinen

View raw message