• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:31:57 -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

  • Prev by Date: Re: Core Data: insertNewObjectForEntityForName doesn't return my custom subclass during migration
  • Next by Date: Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
  • Previous by thread: Re: Question about aliasing (analog clock hands)
  • Next by thread: Making NSFetchedResultsController register changes to the entity's relationship, not just attributes
  • Index(es):
    • Date
    • Thread