views:

22

answers:

1

I have a data model which has two entities in a relationship of one to many.

Each entity has a class that is subclassed from NSManagedObject.

I get the relation set for the one entity and walk it casting each set member to the specific subclass as I enumerate the collection.

When I do

NSLog(@"My Entity: %@", myEntityInstance);

It logs but does not call my subclass's method for:

- (NSString*) description

It does call if I send:

NSLog(@"My Entity: %@", [myEntityInstance description]);

Any ideas what is being called and why description has to be manually called?

Thanks!

A: 

I've never seen that. I don't think it's a NSManagedObject behavior. You might log the class before making the call to make sure your instance is of the class you think it is.

TechZen