Declaring object type as NSManagedObject or class name
- by Don Fulano
In Core Data, if I have a Person entity is there any difference between:
NSManagedObject *aPerson = [NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:[self managedObjectContext]];
or
Person *aPerson = [NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:[self managedObjectContext]];
Should aPerson be of type Person or NSManagedObject? Is there a difference?