How to determine if a relation has already been retrieved?
I need to load the current user's friends. I don't want to retrieve the friends if I have already retrieved them so I am trying to test to see if I have. If I haven't already retrieved the friends, I will do so. The code I am using right now to do this is as follows:
This doesn't work because the NSArray localFriends isn't nil even when "friends" has never been retrieved. It is just an NSArray with 0 objects. I could test to see if the array's count is 0, but what if the user just has 0 friends? I need some help to figure out how to check to see if I have previously loaded the friends property and added it to the currentUser or not. Thanks