0

I have an FRC that fetches a set of Objects that are have a relationship to a Category (one Category to many Objects). My predicate for the fetching the Objects is as follows:

[NSPredicate predicateWithFormat:@"Category.enabled = YES"]

Toggling enabled on a Category should fire off the FRC callback for didChangeObject, to either add or remove all of the Category's Objects from the data set. The initial data set it correctly filtered by this predicate, however any future changes to a Category's enabled property never fires off the FRC callback to remove or add the Objects. The FRC delegate is not nil, other FRC changes are correctly received by the delegate, but the inserts/deletes that should be performed according to this predicate are never fired. What might be causing subsequent changes to not be reflected by the FRC?

Patrick Goley
  • 5,397
  • 22
  • 42
  • @MartinR fixed it thanks, copy paste error. The relationship is set up on a background context, but it is successfully merged to the main thread context. I have verified the relationship exists prior to and after fetching – Patrick Goley Oct 28 '13 at 18:28
  • @MartinR thanks for pointing me to that question. makes sense now, voting to close as duplicate – Patrick Goley Oct 28 '13 at 18:36
  • 1
    Another problem would be that a "merge" does not update objects which are a fault in the main context, compare http://stackoverflow.com/questions/3923826/nsfetchedresultscontroller-with-predicate-ignores-changes-merged-from-different. – Martin R Oct 28 '13 at 18:38

0 Answers0