parse-community / Parse-SDK-dotNET

Parse SDK for .NET, Xamarin, Unity.
http://parseplatform.org
Apache License 2.0
323 stars 260 forks source link

[bug] when ParseQuery.Or a query, the condition checker is wrong. #309

Closed wujun4code closed 3 years ago

wujun4code commented 5 years ago

https://github.com/parse-community/Parse-SDK-dotNET/blob/d0577f4d0979ddadce0c535146a572c3ca31fed0/Parse/Public/ParseQuery.cs#L188

if (!parameters.TryGetValue("where", out object where) || parameters.Count > 1)
                    throw new ArgumentException("None of the queries in an or query can have non-filtering clauses");

should be:

if (!parameters.TryGetValue("where", out object where) || parameters.Count < 1)
                    throw new ArgumentException("None of the queries in an or query can have non-filtering clauses");
TobiasPott commented 5 years ago

Hi @wujun4code thank you for reporting this issue, I'll have a look at this in the next days and in case I can reproduce it I'll integrate your suggested fix and prepare a pull request for it.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.