Return-Path: Delivered-To: apmail-ibatis-user-cs-archive@www.apache.org Received: (qmail 73188 invoked from network); 11 Nov 2005 10:34:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Nov 2005 10:34:55 -0000 Received: (qmail 10945 invoked by uid 500); 11 Nov 2005 10:34:55 -0000 Delivered-To: apmail-ibatis-user-cs-archive@ibatis.apache.org Received: (qmail 10928 invoked by uid 500); 11 Nov 2005 10:34:54 -0000 Mailing-List: contact user-cs-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-cs@ibatis.apache.org Delivered-To: mailing list user-cs@ibatis.apache.org Received: (qmail 10917 invoked by uid 99); 11 Nov 2005 10:34:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2005 02:34:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.185.178.4] (HELO smtp.cad.it) (194.185.178.4) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 11 Nov 2005 02:34:46 -0800 Received: (qmail 39358 invoked by uid 0); 11 Nov 2005 10:38:38 -0000 Received: from unknown (HELO tex.cadit.it) (172.16.0.19) by 0 with SMTP; 11 Nov 2005 10:38:38 -0000 Content-class: urn:content-classes:message Subject: RE: Error in using an ArrayList type as resultClass in IBatis for .net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5E6AB.80012658" X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 11 Nov 2005 11:34:09 +0100 Message-ID: <621CDB480A325A49BF608434668CB57804ABC4C6@tex.cadit.it> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Error in using an ArrayList type as resultClass in IBatis for .net Thread-Index: AcXmmjHe1eXuhbiVSKaG3VBkm3EC5wAELa/g From: "Rencelj Marco" To: X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C5E6AB.80012658 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Gilles, =20 But what about this: =20 =20 Or =20 =20 ??? =20 Where's my error? =20 thanks =20 ________________________________ From: Gilles Bayon [mailto:ibatis.net@gmail.com]=20 Sent: Friday, November 11, 2005 9:30 AM To: user-cs@ibatis.apache.org Subject: Re: Error in using an ArrayList type as resultClass in IBatis for .net =20 If you want to get an ArrayList, you don't need to specify the resultClass. The listClass attribut is used for typed collection. =20 Sample from unit test =20 IList list =3D sqlMap.QueryForList("GetAllDocument", null); =20 On 11/11/05, Rencelj Marco wrote:=20 I had to get a list with a variable number of columns so I had to try ArrayList as resultClass (columns are unnamed). The ArrayList is populated with a correct number of rows but each row instance is an empty ArrayList. I fixed the problem in source code adding a code fragment in MappedStatement.cs as in included code. Anybody had the same problem? May be there is a release that include this fix ... Thanks in advane Marco ------_=_NextPart_001_01C5E6AB.80012658 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Thanks = Gilles,

 

But what about = this:

 

            = <select id=3D"GetAllDocumentPlain" class=3D"ArrayList">

            =       select

            =             = *

            =       from Documents

            =       order by Document_Type, Document_Id

            = </select>

 

Or

 

            = <select id=3D"GetAllDocumentPlain">

            =       select

            =             = *

            =       from Documents

            =       order by Document_Type, Document_Id

            = </select>

 

???

 

Where’s my = error?

 

thanks

 


From: = Gilles Bayon [mailto:ibatis.net@gmail.com]
Sent: Friday, November = 11, 2005 9:30 AM
To: user-cs@ibatis.apache.org
Subject: Re: Error in = using an ArrayList type as resultClass in IBatis for = .net

 

If you want to get an ArrayList, you don't need to specify the resultClass. The listClass attribut is used for typed = collection.

 

Sample from unit test

<select id=3D"GetAllDocument"
   resultMap=3D"document">
   select
    *
   from Documents
   order by Document_Type, Document_Id
  </select>

 

IList list =3D sqlMap.QueryForList("GetAllDocument", = null);
 

On 11/11/05, Rencelj Marco = <rencelj@cad.it> = wrote:

I had to get a list with a variable number of columns so I had to try = ArrayList as resultClass (columns are unnamed).

The ArrayList is populated with a correct number of rows but each row = instance is an empty ArrayList.

I fixed the problem in source code adding a code fragment in = MappedStatement.cs as in included code.

Anybody had the same problem? May be there is a release that include this fix = …

Thanks in advane

Marco

------_=_NextPart_001_01C5E6AB.80012658--