I have a custom NSManagedObject class MyEntity. It works just fine. However when I add an initializer and override the superclass's designated initializer an error occurs.

[< MyEntity 0x1f3f70> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key myAttribute.

The initializer in MyEntity looks like this.

- (id)initWithEntity:(NSEntityDescription *)entity
    insertIntoManagedObjectContext:(NSManagedObjectContext *)context
{
    [super initWithEntity:entity
        insertIntoManagedObjectContext:context];
    return self;
}

Why does the superclass initializer work but my override does not?

Richard

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to