You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unboxing logic checks for PFObject (which catches both PFObjects and PFUsers) before testing for PFUser.
..
// Lastly, if this class is a PFObject or PFUser and it is registered, instantiate the appropriate ParseModel...elseif ([object isKindOfClass:[PFObject class]]) {
// *** PFUser FALLS IN TO THIS CASENSString *unboxedClassString = (self.registeredParseModels)[[(PFObject *) object parseClassName]];
if (unboxedClassString.length) {
unboxedObject = [(ParseModel *) [NSClassFromString(unboxedClassString) alloc] initWithParseObject:object];
}
}
elseif ([object isKindOfClass:[PFUser class]]) {
// *** CODE NEVER GETS HERENSString *unboxedClassString = (self.registeredParseUsers)[[(PFUser *) object parseClassName]];
if (unboxedClassString.length) {
unboxedObject = [(ParseModelUser *) [NSClassFromString(unboxedClassString) alloc] initWithParseUser:object];
}
}
This means the latter branch will never be reached. They need to be reversed.
The text was updated successfully, but these errors were encountered:
fatuhoku
changed the title
PFUser subclasses are not unboxed properly.
PFUser subclasses are never unboxed
Sep 25, 2014
This is due to the fact that
PFUser
objects are subclasses ofPFObject
PFObject
(which catches bothPFObject
s andPFUser
s) before testing forPFUser
.This means the latter branch will never be reached. They need to be reversed.
The text was updated successfully, but these errors were encountered: