-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OData subtable: $top=0 returns all records #337
Comments
looks like odata doesn't have any independent count-only endpoint so we'd have to make one if we wanted one |
That's interesting that OData doesn't have an independent count-only endpoint. What do you think about using the combination of |
yeah i'll fix this top thing rn |
issa-tseng
added a commit
that referenced
this issue
Mar 25, 2021
bug #337: $top=0 would accidentally give ALL rows.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I specify
$top=0
for theSubmissions
table, it returns an empty array. However, when I specify$top=0
for a subtable, it seems to return all records.As background, I was specifying
$top=0
together with$count=true
in order to determine the number of records in a repeat group, related to this forum post. I ended up specifying$top=1
in order not to pull all records. (By the way, I would also be interested if there is a better way to determine that count!)I think this logic can be found in the
extractPaging()
function below, where iflimit
is 0, it defaults toInfinity
:central-backend/lib/formats/odata.js
Lines 53 to 62 in dab8530
The text was updated successfully, but these errors were encountered: