Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Allow equalTo queries with Parse.Object pointers #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikemintz
Copy link

This resolves #37

This allows an equalTo constraint to use a Parse.Object pointer instance and be automatically updated with the result of a mutation. Previously it would only work with flattened parse objects, because it checked .objectId instead of .id. Now it allows for either.

@bytesandwich
Copy link

it seems to me that when I apply this patch, I end up with the key on this.data containing the pointer which doesn't have the fields from the flattened object.

@bytesandwich
Copy link

Actually that was because I was keeping a list of objectIds as strings in an array as a field (edit: rather, a column). This fix does work if I have

       userThing: (new Parse.Query('Things'))
         .equalTo('user', Parse.User.current())
         .include('field1')
         .include('nestedfield2')
         .limit(1)

where before this, the mutation wouldn't propagate without a page refresh.

@mikemintz mikemintz force-pushed the equalto-parse-pointers branch from 154bb22 to 75cbb40 Compare July 14, 2015 23:09
@mikemintz mikemintz force-pushed the equalto-parse-pointers branch from 75cbb40 to ec0d7b5 Compare July 14, 2015 23:10
@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@neilpoulin
Copy link

I applied this patch and it seems to fix my problem. Hope this can get merged into master soon! Thanks @mikemintz

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

Successfully merging this pull request may close these issues.

Issues updating query after mutation
4 participants