Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
- Subject: Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
- From: Karolis Ramanauskas <email@hidden>
- Date: Thu, 3 Dec 2009 15:34:21 -0600
Good day,
I have an NSFetchedResultsController set up with an entity, ENTITY. ENTITY
has a to-one relationship called REL. Now, in my table view, cells display
some data that are the attributes of ENTITY and some data that are the
attributes of REL. When I change the values of the attributes of ENTITY,
everything works great, e.g., the delegate receives a notification and
controller:didChangeObject:... method fires. However when I change the
attributes of ITEM, the change notification does not fire. I do realize this
is not necessarily a bug since I did not update the ENTITY's attributes,
however my table view cells now appear out of sync. To overcome this
problem, I do this whenever I update REL's attributes:
[self.ENTITY willChangeValueForKey:@"REL"];
[self.ENTITY didChangeValueForKey:@"REL"];
This causes the change notification to fire. I was wondering, if there is a
better way to make NSFetchedResultsController know that it should update in
this case.
Thank you very much,
Karolis R.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden