ParseReact
ParseReact copied to clipboard
Allow equalTo queries with Parse.Object pointers
This resolves https://github.com/ParsePlatform/ParseReact/issues/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.
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.
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.
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.
I applied this patch and it seems to fix my problem. Hope this can get merged into master soon! Thanks @mikemintz