How to do perfect KVO for NSManagedObject?

an0,

There is an NSManagedObject method just for doing deletion timed functions: -prepareForDeletion.

Its documentation claims: "You can implement this method to perform any operations required before the object is deleted, such as custom propagation before relationships are torn down, or reconfiguration of objects using key-value observing."

You could also look at using: -willTurnIntoFault and -didTurnIntoFault. But I think you'll be happier using -prepareForDeletion.

Andrew

P.S. This method is documented in the class reference. I respectfully suggest that you save time by reading the documentation.