#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;
}
#585 delta-based peristence of the models contained in the
ResourceRepositoryImplwas introduced. As next step also thePersistableCorrespondenceModelshould be persisted delta-based.Tasks/Hints:
PersistableCorrespondenceModelImpluse a delta-basedcorrespondenceResource(use a ResourceSet that usesDeltaBasedResources) (see [1])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:[1]