Declaring object type as NSManagedObject or class name

Posted by Don Fulano on Stack Overflow See other posts from Stack Overflow or by Don Fulano
Published on 2010-04-17T02:50:13Z Indexed on 2010/04/17 2:53 UTC
Read the original article Hit count: 417

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about core

Related posts about data