SOLVED - Re: CoreData Parent Entity Confusion
SOLVED - Re: CoreData Parent Entity Confusion
- Subject: SOLVED - Re: CoreData Parent Entity Confusion
- From: Andrew Kimpton <email@hidden>
- Date: Sun, 21 Aug 2005 13:40:36 -0700
I wrote:
However when I instantiate an instance of the 'Heat' entity with :
Race *race = [NSEntityDescription
insertNewObjectForEntityForName:@"Heat" inManagedObjectContext:
[self managedObjectContext]];
the resultant class pointer in race is of type NSManagedObject. If
however the entity name is @"Race" then the resultant pointer is
indeed of type Race.
The problem here was that although the class Heat was defined
correctly in a header with inheritance from Race there was no actual
@implementation Heat @end block in the associated .m file. The class
is not really 'fleshed out' so I'd not bothered to add that portion
since there are no methods yet.
Adding an empty implementation fixed the problem. Is this expected ?
Perhaps zerolink is also partly responsible ?
Andrew 8-)
P.S. The clue came when I saw that the Class return from
NSClassFromString for the (correct) classname in the
NSEntityDescription was nil.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden