Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Parse, can I force related ParseObjects to get fetched?

In the Parse android docs it says that by default, related ParsePbjects are not fetched, implying that there is a setting that will fetch them. It later says that they cannot be fetched without a call to fetchIfNeeded. Which is it? I definitely need to fetch the related ParseObject and would prefer to do so without having to make multiple requests. Is that possible?

By default, when fetching an object, related ParseObjects are not fetched. These objects' values cannot be retrieved until they have been fetched like so:

like image 333
Drew Avatar asked Jan 28 '13 07:01

Drew


1 Answers

In the ParseQuery you are using to get the original object, you can use the include(key) method to tell it to also fetch the related object. This works for pointers and arrays of pointers.

like image 137
bklimt Avatar answered Sep 18 '22 12:09

bklimt