Merged
Conversation
aduchate
reviewed
Mar 26, 2026
core/src/main/kotlin/org/taktik/icure/asynclogic/impl/ConflictResolutionLogicImpl.kt
Show resolved
Hide resolved
...main/kotlin/org/taktik/icure/services/external/rest/v2/controllers/core/ContactController.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope of the PR
The current implementation of the automatic solve conflicts may lead to a loss of data (e.g. when merging different
encryptedSelffields). This PR changes this behaviour as follows:Mergers
Merging will now be done through auto-generated merger classes, in a similar fashion of what is done on mappers. Each Merger exposes 2 methods:
canMergemethods that returns true if 2 objects can be merged without loss of information, and false otherwisemergemethods that merges the fields of 2 objectsThe strategy to merge 2 fields or determine if they can be merged is the following:
CanMerge:
Merge:
Automatic Solve Conflcits
The automatic solve conflicts will solve the conflicts as long as the 2 revisions can be merged without loss of information. It may return a partial success or a failure as soon as it encounters a revision that cannot be merged.
New methods
New methods have been added to each controller to allow for a frontend-based merge resolution. In particular, there are 3 new methods for: