Managed Objects and Contexts
Managed Objects and Contexts
- Subject: Managed Objects and Contexts
- From: Richard Somers <email@hidden>
- Date: Wed, 30 May 2012 16:45:53 -0600
I have a question about multiple contexts.
First a quote from the Core Data Programming Guide - "To consider this from a different perspective, a given object in a persistent store may be edited in more than one context simultaneously. Each context, however, has its own managed object that corresponds to the source object, and each managed object may be edited independently. This can lead to inconsistencies during a save-Core Data provides a number of ways to deal with this."
So to recap, a given object in a persistent store may be edited in multiple contexts simultaneously and each context has its own managed object corresponding to the given source object. And when the user saves everything is sorted out by Core Data.
I know that Core Data is not multi-user but this sounds like a multi-user data base use case scenario. Multiple contexts (users) all potentially looking at the same data and the first one to save wins.
Why did Apple do this? What would be a legitimate use case for this scenario?
--Richard
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden