Skip to content

limit = 0 is not work in installations #1755

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

Closed
3 tasks done
ssk7833 opened this issue May 11, 2016 · 5 comments
Closed
3 tasks done

limit = 0 is not work in installations #1755

ssk7833 opened this issue May 11, 2016 · 5 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@ssk7833
Copy link
Contributor

ssk7833 commented May 11, 2016

Environment Setup

  • Server:
    • parse-server: 2.2.9
    • operating system: Windows 7
    • local
  • Database: mongoDB 3.2.4 local

Steps to reproduce

After count problem solved #1726, I want to get the count only so add the limit parameter, but it didn't work.

$ curl -X GET \ 
  -H "X-Parse-Application-Id: myAppId" \
  -H "X-Parse-Master-Key: myMasterKey" \
  http://localhost:1337/parse/installations/?count=1&limit=0

This is what I got:

{
  results: [
    ...my installations...
  ],
  count: 5
}

But what I expected is like current Parse REST API when I use the command below:

$ curl -X GET \
  -H "X-Parse-Application-Id: myAppId" \
  -H "X-Parse-Master-Key: myMasterKey" \
  -H "X-Parse-REST-API-Key: myRestApiKey" \
  https://api.parse.com/1/installations/?count=1&limit=0

It response with installations count like this:

{
  results: [],
  count: 5
}

I tried that parameter like limit = 1 limit = 2 worked good, only 0 not.

@bohemima
Copy link
Contributor

I think, since there is no upper limit on "limit" anymore, that 0 would mean "give me everything", try with -1? (Just guessing here)

@drew-gross drew-gross added the type:bug Impaired feature or lacking behavior that is likely assumed label May 11, 2016
@ssk7833 ssk7833 mentioned this issue May 11, 2016
@jeveloper
Copy link
Contributor

Hey @ssk7833 , i thought it wasnt recommended to use mongo 3.2.X and must use 3.0 ?
Can you confirm if parse server is fine using 3.2?

thank you

@ssk7833
Copy link
Contributor Author

ssk7833 commented May 13, 2016

Yes, I'm using mongoDB 3.2.4.
My environment setup list is correct and it works good.

@drew-gross
Copy link
Contributor

We only officially support Mongo 3.08 and 2.6.11, but the issues in Mongo 3.2.x are related to GeoPoints mostly, so if you aren't using GeoPoints, Mongo 3.2.x might mostly work. We won't be able to provide support or bugfixes for Mongo 3.2.x though.

@jeveloper
Copy link
Contributor

Ahh good to know, i definitely use Geopoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

4 participants