[EMFStore][Edapt] Meta Model evolution [message #1726949] |
Thu, 17 March 2016 12:20  |
Eclipse User |
|
|
|
Hi there,
I want to use an edapt history model within emfstore. Can somebody explain me the actual process to do meta model evolution within emfstore?
Lets say my simple model has a first edapt release with operation "create class". I'm naming it teacher and store it to emfstore.
Then I create a new edapt release where I rename the class teacher to student with "rename" operation supplied by operation browser.
I release it add a new version number to the namespace and generate model and edit code.
Then I want to read my model from emfstore (with help of ecp browser; local emfstore). Obviously the modelcode doesn't fit to the instance anymore - Teacher is missing.
I get many exceptions that the prior namespace couldn't be found. (Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://emfstore/model' not found. (emfstore://serverspaces/default/projects/_yFZtoOxZEeWnXrPCz5jUJA/projectstates/1, 3, 86))
Of course the ns has changed to http://emfstore/model/2
At the end I see a another exception regarding wrong determination of model version: !MESSAGE org.eclipse.emf.emfstore.internal.server.exceptions.InvalidVersionSpecException: Couldn't determine next version in history.
Is this related to edapt?
Thanks in advance
Philippe
|
|
|
|
|
|
Re: [EMFStore][Edapt] Meta Model evolution [message #1780484 is a reply to message #1780260] |
Tue, 23 January 2018 03:22  |
Eclipse User |
|
|
|
Hi,
this was introduced with EMFStore 1.8 and requires Edapt 1.2 or higher.
In order to trigger a migration on server side, there is a special VM argument. Add the emfstore.migration=true VM argument to your server launch configuration. With this option the server will start in a migration mode, meaning that it will check if a migration is required, perform the migration, and stopping itself right after the migration was performed. Then you may start it regularly again.
Enabling the full project state persistence when a version is tagged, can be done via an extension point on server side:
<extension
point="org.eclipse.emf.emfstore.server.resourceOptions">
<resourceOptions
saveProjectStateOnTag="true">
</resourceOptions>
</extension>
For client side migration we suggest a process which notifiers users to commit pending changes, then migrate the server and roll out clients with the new model, where users will start with fresh checkout.
Cheers
Johannes
[Updated on: Tue, 23 January 2018 03:23] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.07737 seconds