first I create a NSFetchedResultsController
with a NSFetchRequest
that fetches all object of entity "Entity".
and then I insert an new NSManagedObject A ,which is an instance of "Entity", and Edit B, which is also an instance of "Entity".
then I call NSArray *result = [fetchedResultsController -fetchedObjects]
, will A and B in result?
Throughout the project, I use only one NSManagedObjectContext.
if I do, what does this mean in its Document?
fetchedObjects The results of the fetch.
@property (nonatomic, readonly) NSArray *fetchedObjects Discussion The value of the property is nil if performFetch: hasn’t been called.
The results array only includes instances of the entity specified by the fetch request (fetchRequest) and that match its predicate. (If the fetch request has no predicate, then the results array includes all instances of the entity specified by the fetch request.)
The results array reflects the in-memory state of managed objects in the controller’s managed object context, not their state in the persistent store. The returned array does not, however, update as managed objects are inserted, modified, or deleted.