From 84d5f87eea61070e8de473cf0a80974add2804b4 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 15 Sep 2009 15:25:08 +0000 Subject: [PATCH] Fix access by name for collections with offset --- src/helma/objectmodel/db/Relation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helma/objectmodel/db/Relation.java b/src/helma/objectmodel/db/Relation.java index bd7c9477..2e1f69dd 100644 --- a/src/helma/objectmodel/db/Relation.java +++ b/src/helma/objectmodel/db/Relation.java @@ -971,7 +971,8 @@ public final class Relation { q.append(" ORDER BY ").append(order); } - if (maxSize > 0) { + // apply limit and offset, but not if the query is for a single object + if (maxSize > 0 && kstr == null) { if (otherType.isOracle()) { // see http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html String selectItem = isCount ? "count(*)" : "*";