Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 19235 invoked from network); 23 Nov 2006 14:18:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Nov 2006 14:18:04 -0000 Received: (qmail 53936 invoked by uid 500); 23 Nov 2006 14:18:10 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 53922 invoked by uid 500); 23 Nov 2006 14:18:10 -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 53911 invoked by uid 99); 23 Nov 2006 14:18:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2006 06:18:10 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of larry.meadors@gmail.com designates 66.249.82.232 as permitted sender) Received: from [66.249.82.232] (HELO wx-out-0506.google.com) (66.249.82.232) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2006 06:17:58 -0800 Received: by wx-out-0506.google.com with SMTP id t14so573555wxc for ; Thu, 23 Nov 2006 06:17:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=FChJsJJw5S7/ui80LBgjCH22fJ8jiaeCJOgZzYkF4ywh77lqbLiMDCitfQZCSs3hJDKJdI66tNwR2f80ubcLF0AJJ7cpAbar9RgUr37i2Q6qf0g6zWCyL9bz1do7VCfNpOfMiskJ0mpyulIfPo69hAjZFz+8rs9Sqy6ZlP88ybU= Received: by 10.90.105.20 with SMTP id d20mr6543931agc.1164291457422; Thu, 23 Nov 2006 06:17:37 -0800 (PST) Received: by 10.90.35.4 with HTTP; Thu, 23 Nov 2006 06:17:37 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 07:17:37 -0700 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: Single column select In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: db7effd35b0fda13 X-Virus-Checked: Checked by ClamAV on apache.org On 11/23/06, c.zecca@ads.it wrote: > > > Hi all > > let's consider a very simple select whose purpose is to extract a column of > basic type. > E.g. > > select MY_COLUMN > from MY_TABLE > > for a list of values such as... > > 24 > 19 > 20 > 24 > 30 > 25 > ... > ( a set if the distinct specification would be used) > > (MY_COLUMN in this case is either of INTEGER or NUMERIC type) > How should I define the SQL map? > I've just read the "Implicit Result Maps" in the developer guide but I have > not found any similar example (single column selection). All examples report > cases of > > select * > > or > > select COLUMN_1, COLUMN_2, ... > > > It's not a primitive result but, instead, a list (or set) of primitive > results. > Instinctively I would exclude an HashMap, because, definitively, return > values are not named and cannot be accessed via keys. > > Should I anyway define a single property class / result map and use it > along with queryForList? > Or is there any simpler way? > > ciao