Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 89084 invoked from network); 30 Oct 2009 09:20:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 09:20:55 -0000 Received: (qmail 84302 invoked by uid 500); 30 Oct 2009 09:20:55 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 84250 invoked by uid 500); 30 Oct 2009 09:20:55 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 84240 invoked by uid 99); 30 Oct 2009 09:20:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 09:20:55 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.133.104.160] (HELO www160.your-server.de) (213.133.104.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 09:20:52 +0000 Received: from [78.46.5.203] (helo=sslproxy01.your-server.de) by www160.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1N3nep-0008IG-48 for users@openjpa.apache.org; Fri, 30 Oct 2009 10:20:31 +0100 Received: from [195.37.209.55] (helo=[127.0.0.1]) by sslproxy01.your-server.de with esmtpa (Exim 4.63) (envelope-from ) id 1N3nzP-0001G6-Ci for users@openjpa.apache.org; Fri, 30 Oct 2009 10:41:47 +0100 Message-ID: <4AEAAFD8.4050504@optitool.de> Date: Fri, 30 Oct 2009 10:20:24 +0100 From: Michael Simons User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Re: Limit the size of the projection of a query References: <4AE9DB38.6050201@optitool.de> <278211.30459.qm@web55906.mail.re3.yahoo.com> In-Reply-To: <278211.30459.qm@web55906.mail.re3.yahoo.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: michael.simons@optitool.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9964/Fri Oct 30 02:39:02 2009) I beg your pardon for asking such a RTFM. I'm wondering how I could have missed that. Thanks, Michael Fay Wang schrieb: > You can call the following API to limit the number of rows returned by the query: > > Query.setMaxResults(maxResults); > > > > > ----- Original Message ---- > From: Michael Simons > To: users@openjpa.apache.org > Sent: Thu, October 29, 2009 11:13:12 AM > Subject: Limit the size of the projection of a query > > Hello, > > Is there a way in JPA or OpenJPA to limit the number of rows returned by a query? > In our formerly used JDO-Implementation there was a function called maxrows doing so. > I know there are several databases that support a limitation of the projection. > But how can I achieve this in JPA? > > Kind Regards, > Michael