Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 20306 invoked from network); 17 Dec 2009 14:36:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 14:36:33 -0000 Received: (qmail 22493 invoked by uid 500); 17 Dec 2009 14:36:32 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 22475 invoked by uid 500); 17 Dec 2009 14:36:32 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 22465 invoked by uid 99); 17 Dec 2009 14:36:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 14:36:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of h.pikkemaat@tsi-solutions.nl designates 217.119.229.242 as permitted sender) Received: from [217.119.229.242] (HELO meel.traserv.com) (217.119.229.242) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 14:36:22 +0000 Received: from localhost (meel.traserv.com [127.0.0.1]) by meel.traserv.com (Postfix) with ESMTP id 2F5FAC2806D for ; Thu, 17 Dec 2009 15:36:15 +0100 (CET) X-Virus-Scanned: amavisd-new at tsi-solutions.nl Received: from meel.traserv.com ([127.0.0.1]) by localhost (meel.traserv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J1BkMzyAuemK for ; Thu, 17 Dec 2009 15:36:09 +0100 (CET) Received: from dhcp-192-168-171-150.int.traserv.com (rev-84.64.222.77.virtu.nl [77.222.64.84]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by meel.traserv.com (Postfix) with ESMTP id DD1011018195 for ; Thu, 17 Dec 2009 15:36:09 +0100 (CET) Message-ID: <4B2A41CD.7040504@tsi-solutions.nl> Date: Thu, 17 Dec 2009 15:35:57 +0100 From: Hans Pikkemaat User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: Retrieving Records for a range of primary keys References: <4B2A2823.9030204@tsi-solutions.nl> <3219fff70912170551q27fd28en5c7cbd882aee85a0@mail.gmail.com> In-Reply-To: <3219fff70912170551q27fd28en5c7cbd882aee85a0@mail.gmail.com> Content-Type: multipart/alternative; boundary="------------050704030208080201040502" X-Virus-Checked: Checked by ClamAV on apache.org --------------050704030208080201040502 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, I guess this produces the 'IN' operator. This would mean I need to produce all the key values in the range I want to retrieve? Is there not a betweenDbExp? tx Hans Andrey Razumovsky wrote: > If you're using SelectQuery, Expression.inDbExp() is for you to go. See > http://cayenne.apache.org/doc/path-expressions.html > > 2009/12/17 Hans Pikkemaat > > >> Hi, >> >> Some paginated mechanisms are based on a persistence layer to be able to >> retrieve records for a range of primary keys. >> >> I know it is possible to insert the primary key field in the definition but >> then I'm also required to populate it >> when I create a record. I'm using a sequence generator to determine the key >> value of a new record. >> >> So my question is: without having to insert the key field in the >> definition, is it possible to query the table >> by primary key range, and if yes, how? >> >> tx >> >> Hans Pikkemaat >> >> >> > > > --------------050704030208080201040502--