Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 43604 invoked from network); 26 Jul 2005 14:23:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2005 14:23:10 -0000 Received: (qmail 13773 invoked by uid 500); 26 Jul 2005 14:23:10 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 13497 invoked by uid 500); 26 Jul 2005 14:23:08 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 13484 invoked by uid 99); 26 Jul 2005 14:23:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 07:23:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of misiek_x@poczta.onet.pl designates 213.180.130.30 as permitted sender) Received: from [213.180.130.30] (HELO smtp2.poczta.onet.pl) (213.180.130.30) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 07:23:00 -0700 Received: from polygonatum.man.poznan.pl ([150.254.170.114]:51205 "EHLO polygonatum") by ps2.test.onet.pl with ESMTP id ; Tue, 26 Jul 2005 16:23:02 +0200 Message-ID: <05fe01c591ed$a665e720$72aafe96@polygonatum> From: "Michal Malecki" To: References: <20050726130455.17198.qmail@hm183.locaweb.com.br> Subject: Re: ResultMap as a HashMap? Date: Tue, 26 Jul 2005 16:23:53 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Impossible - two identical questions on the same day, anyone else? you have two methods in SqlMapExecutor: queryForMap(String id, Object parameterObject, String keyProp) queryForMap(String id, Object parameterObject, String keyProp, String valueProp) the second one is exactly for yous needs Michal Malecki ----- Original Message ----- From: "Eduardo Piva" To: Sent: Tuesday, July 26, 2005 3:04 PM Subject: ResultMap as a HashMap? > Hi list, > > I'm trying to do a resultMap but I can't figure if iBatis support what I'm trying to do. I need to do a select that will return a resultSet with 2 columns and n rows. I want to use this result to populate only one hashmap, using the first column as the key value and the second column as the value. So, I'll end doing a queryForObject, even if my resultSet is a List, because iBatis will iterate over my List and create a hashMap. > > Is it possible? > > Thanks! > > ---- > Eduardo Piva > GWE Software > +55 (19) 3254-7633 > +55 (19) 8114-9488 > www.gwe.com.br > >