Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 94346 invoked from network); 12 Feb 2007 15:04:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2007 15:04:51 -0000 Received: (qmail 3843 invoked by uid 500); 12 Feb 2007 15:04:57 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 3824 invoked by uid 500); 12 Feb 2007 15:04:57 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 3815 invoked by uid 99); 12 Feb 2007 15:04:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 07:04:57 -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 graeme.rocher@gmail.com designates 66.249.82.227 as permitted sender) Received: from [66.249.82.227] (HELO wx-out-0506.google.com) (66.249.82.227) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 07:04:47 -0800 Received: by wx-out-0506.google.com with SMTP id i28so1741369wxd for ; Mon, 12 Feb 2007 07:04:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=kJZHFEIq6xG0xKPwZhW8jvYu+kyO+BvYovQCU09cWGkXVYM4GdQOgyaWVDHToRNpJLztyo8yruAnPpnZgWAlJbrBdPUN8F7b++UyTYbC7PoqTRMFy0dcs3j1f+Sxy6MD9GMQV5eQmf2qCQhyFJmbl4mbGIw7LQgUq3o0IrQ0KMo= Received: by 10.90.98.10 with SMTP id v10mr17230005agb.1171292666758; Mon, 12 Feb 2007 07:04:26 -0800 (PST) Received: by 10.90.119.12 with HTTP; Mon, 12 Feb 2007 07:04:26 -0800 (PST) Message-ID: <3f2c19a70702120704y846557cqfab2b3033a5573fe@mail.gmail.com> Date: Mon, 12 Feb 2007 15:04:26 +0000 From: "Graeme Rocher" Reply-To: graemerocher@yahoo.co.uk Sender: graeme.rocher@gmail.com To: users@jackrabbit.apache.org Subject: Pagination of results & position() comparison queries MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 8b1bf04354646ffe X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm trying to figure out how to go about doing some form of pagination of query results. In Hibernate app you would likely use the setFirstResult and setMaxResults properties to manipulate the result set. However, Hibernate handles the various SQL dialect issues around data pagination for you. I tried the following with an xpath query: //wiki:WikiEntry[(position() > 10) and (position() < 20)] which I was hoping would return me all the "WikiEntry" items between 10 and 20, however it throws this exception: javax.jcr.query.InvalidQueryException: Unsupported expression with position(). Only = is supported. So given that this kind of comparison is not supported with the position() function, how would I go about creating the query I'm after? Is it possible at all? Regards, -- Graeme Rocher Grails Project Lead http://grails.org