If you want to search a to-many relationship, you need to use an Things are more complex, however, if you want to match a prefix or suffix or both—for example, if you want to look for departments in which at least one of the employees has the first name Matt, Matthew, Mattie, or any other name beginning with Matt.
Fundamentally you simply need to add wildcard matching: —putting quotes in the predicate format prevents the variable substitution from happening.
If you specify an abstract parent entity, the Core Data backed controller fetches matching instances of concrete subentities.
Sometimes you may want to set up a filter predicate for a search field that lets a user filter the contents of an array controller based on the destination of a to-many relationship.
Next, it compares this version to the coordinator’s configured data model.
If the store’s model version and the coordinator’s model version don’t match, Core Data will perform a migration, when enabled.
In my own experience, I’ve found there are a few more migration variants than the simple distinction between lightweight and heavyweight.
Below, I’ve provided the more subtle variants of migration names, but these names are not official categories by any means.
Migrations happen in three steps: You might ask, “If something goes wrong, what happens to the original source data store?
The Core Data framework focuses on the object model, while Cocoa bindings focus on the user interface.
Cocoa bindings make it easy to keep the user interface properly synchronized and provide integration between the model, controller, and the user interface (the view in MVC).
This is only possible if the source of truth for your user’s data isn’t in the data store.
In all other cases, you’ll need to safeguard your user’s data.
It is important to note that the controller's fetch is executed as a delayed operation performed after the controller’s managed object context is set (by nib loading). The order of operations can create a problem if you want to perform an operation with the contents of an object controller in either of these methods, because the controller's content is ).