I'd like to add a pointer field to my PFUser subclass, managed by the PFUser subclass. Ideally, the pointer object would be available automatically on the PFUser subclass - saved and fetched when the user is saved and fetched.
With any other PFObject subclass, I would simply add a Dynamic property and be sure to use includeKey when querying.
However, for a PFUser subclass, I'm never actually querying. How can I force the pointer object to fetch?
It's an easy, two-step process in objective-c, even with a subclassed :
Use fetchIfNeededInBackground
to populate the pointer object locally
PFObject *yourPointerObject = [[PFUser currentUser] objectForKey"pointerKey"];
[yourPointerObject fetchIfNeededInBackground];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With