Calling .query().find() on a .relation('myrelation') doesn't return correct results
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.
Good luck! I'm also planning to do a bunch of RN location stuff.
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()
}
}
I suppose this is a problem related to Parse in general, I’ve got a similar issue without using ParseReact.