0

I noticed that changing a managed property in a subclass of NSManagedObject sends KVO notifications, even if I overwrite the automaticallyNotifiesObserversForKey: to return NO.

+(BOOL)automaticallyNotifiesObserversForKey:(NSString *)key{
    return NO;
}

Is this the expected behaviour?

If I change a non-managed property, everything works as expected (no notification is sent).

What's going on and why the difference between managed and non-managed properties?

Fisher
  • 3
  • 1
  • Not 100% sure what is going on here, but from the documentation of `NSManagedObject` regarding `automaticallyNotifiesObserversForKey` "The default implementation for NSManagedObject returns NO for modeled properties, and YES for unmodeled properties." Maybe that will lead you closer to figuring out what is going on if you didn't see that.. – Chris Wagner Dec 07 '13 at 19:21
  • 3
    Duplicate of [NSManagedObject and KVO vs Documentation](http://stackoverflow.com/questions/3728247/nsmanagedobject-and-kvo-vs-documentation) ? – Martin R Dec 07 '13 at 19:31

0 Answers0