ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

Calling .query().find() on a .relation('myrelation') doesn't return correct results

Open dorongutman opened this issue 10 years ago • 3 comments

I've added a relation to my User class in parse to a custom class called Location, in which the user saves the locations on which he wants to get notifications about.

According to the documentation, if I do Parse.User.current().relation('locations').query().find() I'm supposed to get an array of Location objects. However, what I'm getting is an array of ParseUser objects.

I can't seem to get all the actual objects which the user has a relation to.

I'm using react native.

dorongutman avatar Nov 07 '15 07:11 dorongutman

Good luck! I'm also planning to do a bunch of RN location stuff.

quantuminformation avatar Nov 07 '15 13:11 quantuminformation

Perhaps it is query() only without find() I could get the data by doing like the following

observe(props) {
  return {
    user: ParseReact.currentUser,
    channels: Parse.User.current().relation('channels').query()
  }
}

harryworld avatar Nov 18 '15 09:11 harryworld

I suppose this is a problem related to Parse in general, I’ve got a similar issue without using ParseReact.

LeBenLeBen avatar Dec 28 '15 12:12 LeBenLeBen