cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guðmundur Stefán Þorvaldsson (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (CAY-2092) Exception for query that uses pagination and sorting on to-many
Date Wed, 20 Mar 2019 10:20:00 GMT

    [ https://issues.apache.org/jira/browse/CAY-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797008#comment-16797008
] 

Guðmundur Stefán Þorvaldsson edited comment on CAY-2092 at 3/20/19 10:19 AM:
-----------------------------------------------------------------------------

>  

That is my case also, ordering on a to-many relationship.

 

> This seems valid, but not very useful, no?

The way i see it, the result set will contain a completely different set of Artists if ordered
by "artist.painting.name" *asc* vs. *desc* for example. 


was (Author: gummis):
> This seems valid, but not very useful, no?

That is my case also, ordering on a to-many relationship.

The way i see it, the result set will contain a completely different set of Artists if ordered
by "artist.painting.name" *asc* vs. *desc* for example.

 

> 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
(v7.6.3#76005)

Mime
View raw message