Updating attributes core data
Consider the sample app I described in my previous email, imagine we add a new attribute "price" to the Book entity and a new attribute "earnings" to the Author entity that represents the total net income the author earns when selling his books. But what we are trying to achieve here is to implement the scenario described in the Core Data FAQ (in the section "I have a key whose value is dependent...."), and what needs to be done in this case is adding and removing the parent (author) as an observer as child objects (books) are added to and removed from the relationship.
In this first installment, we will be tackling the .
Core Data has had a polarizing effect within the development community.
You’d be hard pressed to meet a Cocoa developer who is completely ambivalent to the topic. I believe that Apple has made significant improvements to the framework each year.
With Core Data being an object graph, updating a property is a three-step process that involved pulling the object into memory, modifying the property and finally writing the change back to the store.
Iterating these steps across thousands of objects leads to long wait times for the user, as well as increased memory and CPU load on the device.
Search for updating attributes core data:
With results that are far more efficient than iterating each object, you might guess there are some tradeoffs.