Graphics Programs Reference
In-Depth Information
Core Data is a very powerful and flexible persistence framework, and this chapter has
been just a quick introduction to its capabilities. For more details, we strongly suggest that
you read Apple's
Core Data Programming Guide
. Here are some of the things we have
not delved into:
•
NSFetchRequest
is a powerful mechanism for specifying data you want from
the persistent store. We used it a little, but you will want to go deeper. You should
also explore the following related classes:
NSPredicate
,
NSSortOrdering
,
NSExpressionDescription
, and
NSExpression
. Also, fetch request
templates can be created as part of the model file.
• A
fetched property
is a little like a to-many relationship and a little like an
NSFetchRequest
. You typically specify them in the model file.
• As your app evolves from version to version, you'll need to change the data mod-
el over time. This can be tricky - in fact, Apple has an entire book about it:
Data
Model Versioning and Data Migration Programming Guide
.
• There is good support for validating data as it goes into your instances of
NSManagedObject
and again as it moves from your managed object into the
persistent store.
• You can have a single
NSManagedObjectContext
working with more than
one persistent store. You partition your model into
configurations
and then assign