|[Edapt] Strange behavior in Classifiers ID [message #1771052]
||Mon, 21 August 2017 14:01
| Alain BERNARD
Registered: August 2017
I've starting to learn Edapt for some migration we have to do on a widely spread model.
So I created a v1 release for the existing version of my model, and then created a simple "Custom Migration" to test the behavior in a V2 version, as explained in the tutorial. Then, I connected the migration process in our editor to have it automatically launched when user starts editing the file.
All the process is starting fine, but then, I ran into two problems:
- I have custom datatypes for which I customized in the factory the convertXFromString and convertXToString methods. Then, when Edapt reload the v1 model, I have an IllegalValueException because these methods are not called anymore, despite still being present in the factory, and not impacted by any change in the model.
I managed to solve it with the extension point o.e.e.edapt.factories, but then I ran into the second problem:
- Having overriden the factory, the values are correctly converted but then I have an exception "The class 'MyClass' is not a valid classifier", because the "create(EClass eClass)" method of the factory is called on MyClass, which seems to have the classifier ID number 25, which is not at all a classifier of my EMF Package (it only corresponds to an attribute), in the v1 or in the V2 version of the package.
Is it a known issue when using custom factories in Edapt? Do I have to do something differently for the first issue I have?
Powered by FUDForum
. Page generated in 0.01428 seconds