ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

Allow equalTo queries with Parse.Object pointers

Open mikemintz opened this issue 9 years ago • 4 comments

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.

mikemintz avatar May 20 '15 17:05 mikemintz

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 avatar Jun 23 '15 03:06 bytesandwich

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.

bytesandwich avatar Jun 23 '15 04:06 bytesandwich

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.

ghost avatar Aug 04 '15 19:08 ghost

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

neilpoulin avatar Dec 31 '15 20:12 neilpoulin