iPhone CoreData: How can I track/observe all changes within a subgraph?
Posted
by D Carney
on Stack Overflow
See other posts from Stack Overflow
or by D Carney
Published on 2010-03-17T16:19:58Z
Indexed on
2010/03/17
16:21 UTC
Read the original article
Hit count: 310
I have a NSManagedObjectContext in which I have a number of subclasses of NSManagedObjects such that some are containers for others. What I'd like to do is watch a top-level object to be notified of any changes to any of its properties, associations, or the properties/associations of any of the objects it contains.
Using the context's 'hasChanges' doesn't give me enough granularity. The objects 'isUpdated' method only applies to the given object (and not anything in its associations). Is there a convenient (perhaps, KVO-based) was I can observe changes in a context that are limited to a subgraph?
© Stack Overflow or respective owner