Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 89185 invoked from network); 19 Mar 2010 14:35:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Mar 2010 14:35:51 -0000 Received: (qmail 97821 invoked by uid 500); 19 Mar 2010 14:35:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 97736 invoked by uid 500); 19 Mar 2010 14:35:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 97728 invoked by uid 99); 19 Mar 2010 14:35:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 14:35:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 14:35:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4505C234C1F2 for ; Fri, 19 Mar 2010 14:35:27 +0000 (UTC) Message-ID: <1860776020.364571269009327281.JavaMail.jira@brutus.apache.org> Date: Fri, 19 Mar 2010 14:35:27 +0000 (UTC) From: "Oliver Ringel (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly In-Reply-To: <307863651.315741268843787273.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847387#action_12847387 ] Oliver Ringel commented on OPENJPA-1580: ---------------------------------------- Hi Fay, your patch fixed the bug. Thanks. > Using firstResult and maxResults in queries is not working properly > ------------------------------------------------------------------- > > Key: OPENJPA-1580 > URL: https://issues.apache.org/jira/browse/OPENJPA-1580 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.0.0-beta2 > Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 > Reporter: Oliver Ringel > Attachments: OPENJPA-1580.patch, openjpa1580.tar > > > Hi again, > I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. > Here is the relevant part of the logging. > DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id > [DEBUG,SQL,main] executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC > [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id > [DEBUG,SQL,main] executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC > Both queries are identical. So my guess is once more the trouble comes from the query cache. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.