Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 71457 invoked from network); 6 Dec 2007 06:43:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Dec 2007 06:43:34 -0000 Received: (qmail 39657 invoked by uid 500); 6 Dec 2007 06:43:22 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 39635 invoked by uid 500); 6 Dec 2007 06:43:22 -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 39626 invoked by uid 99); 6 Dec 2007 06:43:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2007 22:43:22 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of plinskey@gmail.com designates 64.233.184.233 as permitted sender) Received: from [64.233.184.233] (HELO wr-out-0506.google.com) (64.233.184.233) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2007 06:43:01 +0000 Received: by wr-out-0506.google.com with SMTP id c57so91944wra for ; Wed, 05 Dec 2007 22:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Yrd4SPni9Hqk5y+4gQi/3v8bYynQEfvK6X/gk2IcuNc=; b=d0z+1tONIoyXHpLiLIDbDGfMUrMCkssGvZnesCR8hf5e1PBIx3fYqiyOsQ5s6cqniAUmYPj9hKk+Q9Drq67GzSMEDMrdf8Zb0vv8wdGv3m8rlCw8iaF4p5KJTeFLwBjjk+E5anmkUFGTQNVi9B09+2GQTmSpMvLYAF3cAKFSUyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X+OrCUogwIvuTBqffg5s88H6j7K+IzOgy5A60+dIp7kUyPDNkCoUrQNXlNJ0o+jRek5fYqNwwgcDwjLGvdmikH8Gzfn26tLpB23x8FBCrTUeN6VYTvigpFx+MZL8B+xLFtZdbdNl6Lhy7tmNJtC7NVCVzI8EOUdqSKhKznAT4hg= Received: by 10.150.92.11 with SMTP id p11mr1063565ybb.1196923382904; Wed, 05 Dec 2007 22:43:02 -0800 (PST) Received: by 10.150.158.20 with HTTP; Wed, 5 Dec 2007 22:43:02 -0800 (PST) Message-ID: <7262f25e0712052243h3903550dk3977ce5fd4ec154e@mail.gmail.com> Date: Thu, 6 Dec 2007 13:43:02 +0700 From: "Patrick Linskey" To: users@openjpa.apache.org Subject: Re: Programmatically pagination does NOT work with OpenJPA 1.0.1 In-Reply-To: <14186916.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13717713.post@talk.nabble.com> <7262f25e0711121654v5c3f0c5byadb3d260a090b329@mail.gmail.com> <13717920.post@talk.nabble.com> <14186916.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org FTR, I think that this is now resolved in the 1.1.0 snapshots. -Patrick On Dec 6, 2007 1:08 PM, roger.keays wrote: > > same problem on postgres 7.4. broken in 1.0.1 but works in 1.0.0 > > will there be a 1.0.2 release to fix these sorts of things? > > cheers, > > rog > > > Marc Prud'hommeaux wrote: > > > > Frank- > > > > This sounds like something that was fixed in the trunk for revision > > #584463: > > > > > > > > It was a fix for a problem introduced by > > > >. > > > > The latest trunk snapshots don't have the bug, but the fix would need > > to be backported to 1.0 branch if a fix is needed for that line. > > > > Can you open a JIRA so we can track it? > > > > > > > > On Nov 12, 2007, at 5:11 PM, frankca wrote: > > > >> > >> I run a regression tests from 1.0.0 i.e. the tests work with 1.0.0. > >> > >> Look at the generated SQLs, it obviously missing the subquery using > >> ROWNUM > >> (using Oracle DB). > >> > >> Here are the SQL stmts: > >> OpenJPA 1.0.1: > >> > >> SELECT t0.id AS c0, t0.version AS c1, t0.last_updated_by AS c2, > >> t0.last_updated_date AS c3, t1.id AS c4, t1.version AS c5, > >> t1.last_updated_by AS c6, t1.last_updated_date AS c7, t2.id AS c8, > >> t2.version AS c9, t2.last_updated_by AS c10, t2.last_updated_date AS > >> c11, > >> t2.language AS c12, t2.name AS c13, t1.content AS c14, t3.id AS c15, > >> t3.version AS c16, t3.last_updated_by AS c17, t3.last_updated_date > >> AS c18, > >> t3.name AS c19, t1.load_date AS c20, t4.id AS c21, t4.type AS c22, > >> t1.modified AS c23, t1.review_status AS c24, t1.title AS c25, t1.url > >> AS c26, > >> t5.id AS c27, t5.version AS c28, t5.last_updated_by AS c29, > >> t5.last_updated_date AS c30, t5.name AS c31, t6.id AS c32, > >> t6.version AS > >> c33, t6.last_updated_by AS c34, t6.last_updated_date AS c35, t6.name > >> AS c36, > >> t7.id AS c37, t7.version AS c38, t7.last_updated_by AS c39, > >> t7.last_updated_date AS c40, t7.name AS c41, t0.byte_length AS c42, > >> t0.byte_offset AS c43, t0.text AS c44 FROM fact t0, document t1, > >> collection > >> t2, data_source t3, mime_type t4, fact_rule t5, fact_type t6, > >> fact_type t7 > >> WHERE (t0.fact_type_fk = ? AND t0.document_fk = ?) AND > >> t0.document_fk = > >> t1.id(+) AND t0.fact_rule_fk = t5.id(+) AND t0.fact_type_fk = > >> t7.id(+) AND > >> t1.collection_fk = t2.id(+) AND t1.data_source_fk = t3.id(+) AND > >> t1.mime_type_fk = t4.id(+) AND t5.fact_type_fk = t6.id(+) > >> [params=(long) 3, > >> (long) 2] > >> > >> OpenJPA 1.0.0: > >> > >> SELECT * FROM (SELECT r.*, ROWNUM RNUM FROM (SELECT t0.id AS c0, > >> t0.version > >> AS c1, t0.last_updated_by AS c2, t0.last_updated_date AS c3, t1.id > >> AS c4, > >> t1.version AS c5, t1.last_updated_by AS c6, t1.last_updated_date AS > >> c7, > >> t2.id AS c8, t2.version AS c9, t2.last_updated_by AS c10, > >> t2.last_updated_date AS c11, t2.language AS c12, t2.name AS c13, > >> t1.content > >> AS c14, t3.id AS c15, t3.version AS c16, t3.last_updated_by AS c17, > >> t3.last_updated_date AS c18, t3.name AS c19, t1.load_date AS c20, > >> t4.id AS > >> c21, t4.type AS c22, t1.modified AS c23, t1.review_status AS c24, > >> t1.title > >> AS c25, t1.url AS c26, t5.id AS c27, t5.version AS c28, > >> t5.last_updated_by > >> AS c29, t5.last_updated_date AS c30, t5.name AS c31, t6.id AS c32, > >> t6.version AS c33, t6.last_updated_by AS c34, t6.last_updated_date > >> AS c35, > >> t6.name AS c36, t7.id AS c37, t7.version AS c38, t7.last_updated_by > >> AS c39, > >> t7.last_updated_date AS c40, t7.name AS c41, t0.byte_length AS c42, > >> t0.byte_offset AS c43, t0.text AS c44 FROM fact t0, document t1, > >> collection > >> t2, data_source t3, mime_type t4, fact_rule t5, fact_type t6, > >> fact_type t7 > >> WHERE (t0.fact_type_fk = ? AND t0.document_fk = ?) AND > >> t0.document_fk = > >> t1.id(+) AND t0.fact_rule_fk = t5.id(+) AND t0.fact_type_fk = > >> t7.id(+) AND > >> t1.collection_fk = t2.id(+) AND t1.data_source_fk = t3.id(+) AND > >> t1.mime_type_fk = t4.id(+) AND t5.fact_type_fk = t6.id(+)) r WHERE > >> ROWNUM <= > >> ?) WHERE RNUM > ? [params=(long) 3, (long) 2, (long) 5, (long) 2] > >> > >> -Frank > >> > >> > >> > >> Patrick Linskey-2 wrote: > >>> > >>> What SQL do you see? Is this a regression from 1.0.0, or something > >>> that you're running into for the first time? > >>> > >>> -Patrick > >>> > >>> On Nov 12, 2007 4:46 PM, frankca wrote: > >>>> > >>>> Programmatically pagination does NOT work with OpenJPA 1.0.1 i.e. > >>>> using > >>>> EntityManager.setFirstResult()/setMaxResults(). > >>>> > >>>> Sorry, I don't have time to package a test case for now. > >>>> > >>>> -Frank > >>>> > >>>> -- > >>>> View this message in context: > >>>> http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a13717713 > >>>> Sent from the OpenJPA Users mailing list archive at Nabble.com. > >>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> Patrick Linskey > >>> 202 669 5907 > >>> > >>> > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a13717920 > >> Sent from the OpenJPA Users mailing list archive at Nabble.com. > >> > > > > > > > > -- > View this message in context: http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a14186916 > > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > -- Patrick Linskey 202 669 5907