You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (Jira)" <ji...@apache.org> on 2021/03/10 08:12:00 UTC
[jira] [Updated] (CAY-2092) Exception for query that uses
pagination and sorting on to-many
[ https://issues.apache.org/jira/browse/CAY-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nikita Timofeev updated CAY-2092:
---------------------------------
Fix Version/s: (was: 4.2.M3)
4.2.B1
> 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
> Fix For: 4.2.B1
>
>
> 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
(v8.3.4#803005)