[
https://issues.apache.org/jira/browse/OLINGO-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15541449#comment-15541449
]
Ramya commented on OLINGO-950:
------------------------------
Hi Peter,
Whenever server side pagination is enabled we get a skiptoken specifying the
number of records that can be fetched at any given time. This is specified by
the __next link. If $top value specified is less than the skip token value then
the next link will not appear. If the $top value is greater than the skip token
value then the next link will be specified with skiptoken and $top accordingly
calculated.
e.g
1.http://services.odata.org/V2/Northwind/Northwind.svc/Products
Generates a skiptoken
<link rel="next"
href="http://services.odata.org/V2/Northwind/Northwind.svc/Products?$skiptoken=20"
/>
2.With $top value less than skiptoken value and $inlinecount is allpages
http://services.odata.org/V2/Northwind/Northwind.svc/Products?$top=10&$inlinecount=allpages
No next link generated
<m:count>77</m:count>
3.With $top value greater than skiptoken and $inlinecount is allpages
http://services.odata.org/V2/Northwind/Northwind.svc/Products?$top=30&$inlinecount=allpages
next link is generated as
<link rel="next"
href="http://services.odata.org/V2/Northwind/Northwind.svc/Products?$inlinecount=allpages&$top=10&$skiptoken=20"
/>
<m:count>77</m:count>
Kindly let me know if the issue is something else.
Regards,
Ramya
> Using both $top and $inlinecount writes a __next link
> -----------------------------------------------------
>
> Key: OLINGO-950
> URL: https://issues.apache.org/jira/browse/OLINGO-950
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.6
> Reporter: Peter Rilling
>
> Using both $top and $inlinecount writes a __next link. From what I
> understand, $top/$skip are supposed to enable client paging, so the server
> should not send "next" link. Without $inlinecount, this is true, but add
> that option and the "next" link is written.
> I am comparing this to the following service, which does not have the "next"
> link:
> http://services.odata.org/V2/Northwind/Northwind.svc/Customers?$format=json&$inlinecount=allpages&$top=2
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)