Parse-SDK-Flutter
                                
                                 Parse-SDK-Flutter copied to clipboard
                                
                                    Parse-SDK-Flutter copied to clipboard
                            
                            
                            
                        QueryBuilders in QueryBuilder.or
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest version of Parse Server and the Parse Flutter SDK.
Issue Description
QueryBuilders in QueryBuilder.or has a problem when limit is used and does not send the limit value!
Steps to reproduce
I used the following code but it did not send the limit value
QueryBuilder<ParseObject> queryTop = QueryBuilder<ParseObject>(object)
  ..whereLessThanOrEqualTo("createdAt", skip)
  ..setLimit(5);
QueryBuilder<ParseObject> queryBottom = QueryBuilder<ParseObject>(object)
  ..whereGreaterThan("createdAt", skip)
  ..setLimit(5);
query = QueryBuilder.or(
  object,
  [queryBottom,queryTop],
);
query.whereEqualTo('room', room);
query.includeObject(["replay"]);
await query.query();
URL
http://ip:port/api/classes/Message?where={"$or":[{"createdAt":{"$gt":{"__type":"Date","iso":"2022-09-30T14:30:13.658Z"}}},{"createdAt":{"$lte":{"__type":"Date","iso":"2022-09-30T14:30:13.658Z"}}}],"room": {"__type":"Pointer","className":"Room","objectId":"mkS0O2mXpg"}}&include=replay
Finally, because the library did not send the limit, it returned all the data!
Actual Outcome
According to the example above, the output should be about 10 items
Expected Outcome
But the server sent all the data!
Environment
parse_server_sdk_flutter: 3.1.3
Parse Flutter SDK
- SDK version: 3.1.3
- Operating system version: 11
Server
- Parse Server version: 5.2.5
Logs
None
Thanks for opening this issue!
- 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
I tried to solve the problem but it seems like it is a limitation on Parse server side.
parse server cannot process or , and and nor with two or severallimit in where
Hm, there may be limitations, but we may also be able to lift them with a PR in Parse Server.
So I guess we can change this to feature.