Skip to content
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

equalTo objectId + equalTo relational field give incorrect result in query #801

Closed
carmenlau opened this issue Mar 3, 2016 · 5 comments · Fixed by #809
Closed

equalTo objectId + equalTo relational field give incorrect result in query #801

carmenlau opened this issue Mar 3, 2016 · 5 comments · Fixed by #809
Assignees

Comments

@carmenlau
Copy link
Contributor

Here is the code snippet:

query.equalTo("objectId", "OBJECT_ID");
query.equalTo("users", user);

In our data, the expected result should be object with objectId OBJECT_ID.
Expected result: object with objectId OBJECT_ID.
In v2.3.1: object with objectId different from OBJECT_ID.
In current master (c6406b9): return undefined.

@flovilmart
Copy link
Contributor

Something similar is tested here with containedIn. I'll track it down!

@carmenlau
Copy link
Contributor Author

Thanks a lot @flovilmart . After testing v2.1.4, the problem is still existing. The query return random object with different OBJECT_ID again this time. Let me know if any information cloud help!

@flovilmart
Copy link
Contributor

carmenlau added a commit to carmenlau/parse-server that referenced this issue Mar 7, 2016
@carmenlau
Copy link
Contributor Author

Yes @flovilmart It is similar to my use case! I change the testing query like this and it breaks.

query.equalTo("objectId", parent2.id);
query.equalTo("toChilds", childObjects[2]);

The expected length of result list should be 1, and the object should be parent2. But now the length is 2.

For your refs: carmenlau@825f973

@flovilmart
Copy link
Contributor

I'll look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants