Fetching
Fetching is the term used to describe the resolving of NSManagedObject objects from the repository. When we retrieve an NSManagedObject, it’s “fetched” into memory, and we can then access its properties. To help us utilize memory efficiently, fetching may not always happen all at once. Specifically, when we’re using a SQLite store, it’s quite possible that an object we think is in memory is only on disk and has yet to be read into memory. Likewise, objects that we think we’re done with may actually still sit in a cache.
To demonstrate the differences in the ways that we can load data into memory from our SQLite Store, I ran a number of tests using one of Apple’s older demonstration application from a previous Worldwide Developer Conference ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access