Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F085A200B0F for ; Fri, 17 Jun 2016 20:09:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EF617160A64; Fri, 17 Jun 2016 18:09:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 743AF160A61 for ; Fri, 17 Jun 2016 20:09:06 +0200 (CEST) Received: (qmail 70929 invoked by uid 500); 17 Jun 2016 18:09:05 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 70878 invoked by uid 99); 17 Jun 2016 18:09:05 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2016 18:09:05 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5C88D2C0451 for ; Fri, 17 Jun 2016 18:09:05 +0000 (UTC) Date: Fri, 17 Jun 2016 18:09:05 +0000 (UTC) From: "Andrus Adamchik (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAY-2092) Exception for query that uses pagination and sorting on to-many MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Jun 2016 18:09:07 -0000 Andrus Adamchik created CAY-2092: ------------------------------------ Summary: Exception for query that uses pagination and sorting on to-many Key: CAY-2092 URL: https://issues.apache.org/jira/browse/CAY-2092 Project: Cayenne Issue Type: Bug Affects Versions: 4.0.M3 Reporter: Andrus Adamchik Priority: Minor Somehow we haven't seen this reported before, perhaps because the combination makes no practical sense. I was able to find it during regression testing of a LinkRest app that translates REST calls to Cayenne SelectQueries. Anyways, a query that uses pagination and also ordering on a property of a to-many relationship (the ordering part doesn't make sense) ends up generating the following exception, even though all the data is there: org.apache.cayenne.CayenneRuntimeException: [v.4.0.M3 Feb 08 2016 16:38:05] Some ObjectIds are missing from the database. Expected 62, fetched 31 at org.apache.cayenne.access.IncrementalFaultList.checkPageResultConsistency(IncrementalFaultList.java:323) at org.apache.cayenne.access.IncrementalFaultList.resolveInterval(IncrementalFaultList.java:262) at org.apache.cayenne.access.IncrementalFaultList.get(IncrementalFaultList.java:507) at com.nhl.link.rest.encoder.ListEncoder.visit(ListEncoder.java:168) -- This message was sent by Atlassian JIRA (v6.3.4#6332)