Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Knowledge Base merging enhancement #125

Closed
4 of 5 tasks
yuripourre opened this issue Jul 28, 2021 · 0 comments · Fixed by #131
Closed
4 of 5 tasks

[Core] Knowledge Base merging enhancement #125

yuripourre opened this issue Jul 28, 2021 · 0 comments · Fixed by #131

Comments

@yuripourre
Copy link
Member

yuripourre commented Jul 28, 2021

Add an example showing how to merge deserialized databases.

This makes a lot of sense during deserialization but the merge method could have this approach as a merging strategy.

  • Add Merge Strategies (overwrite, accumulate, create new)
  • Overwrite strategy, overwrite the concept if ID is the same (risky, could create orphan references)
  • [Core] Add Accumulate Strategy #132
  • Create new strategy (described below)
  • Update deserialization and merge method to use merging strategies.

Create New (Strategy)
During deserialization, if the ID already exists in the database, this ID should be mapped to a new (generated) one.

And every reference to this old ID should be updated to the new one.

A simple HashMap would do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant