You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Francesco longhitano (JIRA)" <ji...@apache.org> on 2017/09/18 11:02:00 UTC

[jira] [Created] (OLINGO-1183) JPAPage - Load all entities from DB, no paging on DB query

Francesco longhitano created OLINGO-1183:
--------------------------------------------

             Summary: JPAPage - Load all entities from DB, no paging on DB query
                 Key: OLINGO-1183
                 URL: https://issues.apache.org/jira/browse/OLINGO-1183
             Project: Olingo
          Issue Type: Bug
          Components: odata4-JPA
    Affects Versions: V2 2.0.9, V2 2.0.8
            Reporter: Francesco longhitano


If i using the paging with $top, $skip and $inlinecount=allpages the class JPAPage load all entities from DB (howewer filter by the where), no setting on top and skip for paginated query directly from db. That's a problem if the query return many result (in our case ~100000 of complex entity).

I'm looking into the code and the problem is not so easy to resolve. The inlinecount is managed by ODataJPAResponseBuilderDefault, as an size() called on the result of query. Then if there is top or skip the class do a filter on the result list. So even if i correct set top and skip on JPAPage modifing the method handlePaging using an custom implementation of JPAProcessor, then the result __count show an wrong result.

Example URL
Entities?$skip=10&$top=10&$inlinecount=allpages



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)