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

Save Correspondence Model Delta-Based #590

Open
h4uges opened this issue May 5, 2023 · 0 comments
Open

Save Correspondence Model Delta-Based #590

h4uges opened this issue May 5, 2023 · 0 comments

Comments

@h4uges
Copy link
Contributor

h4uges commented May 5, 2023

#585 delta-based peristence of the models contained in the ResourceRepositoryImpl was introduced. As next step also the PersistableCorrespondenceModel should be persisted delta-based.

Tasks/Hints:

  • in PersistableCorrespondenceModelImpl use a delta-based correspondenceResource (use a ResourceSet that uses DeltaBasedResources) (see [1])
  • the current implementation loads the CorrenspondenceModel and resolves its references later with the loaded models (loadSerializedCorrespondences). As the corrensondence-model shall be saved delta-based the implementation attempts to resolve the references during the application of the deltas. This leads to errors, as the references are unknown. Therefore a different mechanism is needed. Possible approaches:
    • store external references as proxies ("LazyIdResolver") and allow Proxies during application of changes ("LazyResolveAndApply")
    • use a common ResourceSet for models and correspondence model
    • ...

[1]

private static ResourceSet createDeltaBasedResourceSet() {
	ResourceSet resourceSet = withGlobalFactories(new ResourceSetImpl());
	resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new DeltaBasedResourceFactory());
	return resourceSet;
}
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

No branches or pull requests

1 participant