Reputation: 20238
Documentation says:
case mergeByPropertyStoreTrumpMergePolicyType Specifies a policy that merges conflicts between the persistent store’s version of the object and the current in-memory version, giving priority to external changes.
So, I am not sure what they mean with "giving priority to external changes."
I am trying to figure out what happens with this policy when I have a context set to that policy, on saving the context if there is a merge conflict, does the context's version get saved or does the store keep the version of the object it already have? So, does the context win or the store win?
Upvotes: 1
Views: 1101
Reputation: 1380
NSMergeByPropertyStoreTrumpMergePolicy
doc says:
The merge occurs by individual property. For properties that have been changed in both the external source and in memory, the
external
changes trump thein-memory
ones.
NSMergeByPropertyObjectTrumpMergePolicy
doc says:
The merge occurs by individual property. For properties that have been changed in both the external source and in memory, the
in-memory
changes trump theexternal
ones.
So, external means the data from the store. In the first case the store keeps its data, in the second the data is overwritten with the context version of the object.
Hope this helps!
Upvotes: 7