Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 4406 invoked from network); 21 Jul 2007 16:06:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jul 2007 16:06:51 -0000 Received: (qmail 22374 invoked by uid 500); 21 Jul 2007 16:06:47 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 22363 invoked by uid 500); 21 Jul 2007 16:06:46 -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 22352 invoked by uid 99); 21 Jul 2007 16:06:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jul 2007 09:06:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of fcoexposito@hotmail.com designates 65.54.246.137 as permitted sender) Received: from [65.54.246.137] (HELO bay0-omc2-s1.bay0.hotmail.com) (65.54.246.137) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Jul 2007 09:06:43 -0700 Received: from hotmail.com ([65.55.133.101]) by bay0-omc2-s1.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 21 Jul 2007 09:06:22 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 21 Jul 2007 09:06:22 -0700 Message-ID: Received: from 65.55.133.123 by by128fd.bay128.hotmail.msn.com with HTTP; Sat, 21 Jul 2007 16:06:18 GMT X-Originating-IP: [81.42.238.62] X-Originating-Email: [fcoexposito@hotmail.com] X-Sender: fcoexposito@hotmail.com In-Reply-To: From: "Francisco Exposito Aguilera" To: user-java@ibatis.apache.org Subject: Re: select doubt Date: Sat, 21 Jul 2007 16:06:18 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 21 Jul 2007 16:06:22.0809 (UTC) FILETIME=[152A4490:01C7CBB1] X-Virus-Checked: Checked by ClamAV on apache.org I�ve checked my code and I think I am doing something wrong in my resultMap, but I don�t know how to solve it... In my old resultMap I had and atrib_id is not an ArrayList Now I have as property atrib_ which is an ArrayList and it gets the Attributes with the function getAtributos. But there is no column for this . If I put as column ATRIB_ID (which is not an ArrayList), then I obtain the error Error setting property 'setAtrib_' ... Cause: java.lang.IllegalArgumentException: argument type mismatch Any idea? Thanks >From: "Jeff Butler" >Reply-To: user-java@ibatis.apache.org >To: user-java@ibatis.apache.org >Subject: Re: select doubt >Date: Thu, 19 Jul 2007 10:08:58 -0500 > >I belive the issue is that your setter isn't quite right. Should be like >this: > >public void setAtrib_ (ArrayList atrib_) {this.atrib_ = atrib_;} > >If you do it this way, iBATIS will know to expect multiple values for the >attributes. > >Jeff Butler > > > > >On 7/19/07, Francisco Exposito Aguilera wrote: >> >>Hello, >> >>I have another typical issue of a beginner!!!!! >> >>I have two tables: >> >>ELEM: id, name, atrib_id >>ATRIB: id, name, value >> >>In Elem java class I�ve defined >> >>private ArrayList atrib_ = new ArrayList(); >>public void setAtrib_ (Atrib atrib) {atrib_.add(atrib);} >> >>and in sqlMap I�ve defined: >> >> >> >> >> >> >> >> >> >> >> >select="getAtributos" >>/> >> >> >> >> >> >> >>All this works properly if I have only one attribute for every element, >>but >>if there are two attribute for any element, the I obtain the error: >> >>Cause: java.sql.SQLException: Error: executeQueryForObject returned too >>many >>results. >> >>I understand the error, but I am not able to find the solution!!! How >>could >>I solve it? Thanks >> >> >> >> _________________________________________________________________ Un amor, una aventura, compa��a para un viaje. Reg�strate gratis en MSN Amor & Amistad. http://match.msn.es/match/mt.cfm?pg=channel&tcid=162349