This PR brings improved conflict resolution in the form of three strategies:
ClientWins
ServerWins
LatestWins
Users can select a strategy on a per-table basis by setting the ConflictResolutionStrategy property. In the event that users want to handle conflicts on a per-conflict basis (rather than using a overlying strategy for all conflicts), they can set the ConflictResolutionStrategyDelegate, which allows users to return their own ConflictResolutionStrategy. This is great, as users can implement this delegate to ask users which version they prefer, and return the strategy selected by the user.
In both approaches, the developer is not responsible for the actual logic of resolving the conflict, only for selecting which logic (or strategy) to execute.
Note: Because LatestWins will only occur when the client is the offender (e.g. the server wouldn't be throwing the exception to us if they were the last write), selecting this strategy is the equivalent of picking ClientWins.
This PR brings improved conflict resolution in the form of three strategies:
Users can select a strategy on a per-table basis by setting the
ConflictResolutionStrategy
property. In the event that users want to handle conflicts on a per-conflict basis (rather than using a overlying strategy for all conflicts), they can set theConflictResolutionStrategyDelegate
, which allows users to return their ownConflictResolutionStrategy
. This is great, as users can implement this delegate to ask users which version they prefer, and return the strategy selected by the user.In both approaches, the developer is not responsible for the actual logic of resolving the conflict, only for selecting which logic (or strategy) to execute.
Note: Because
LatestWins
will only occur when the client is the offender (e.g. the server wouldn't be throwing the exception to us if they were the last write), selecting this strategy is the equivalent of pickingClientWins
.