[Edapt] A question about custom migration [message #1460547] |
Mon, 03 November 2014 12:32  |
Eclipse User |
|
|
|
Hi,
As far as I have understood the method :
public void migrateBefore(Model model, Metamodel metamodel) throws MigrationException {
// Put your code here before migration
}
It should receive the metamodel before modification has been applied. Right ?
What could be the reason why I currently receive the expected metamodel and not the initial ? Is it a problem of URI in historic ? Should the 'Custom Migration' be at the beginning of the release ?
I have also a model which refer to the new meta model too... While no migration has been done... Strange behavior....
|
|
|
|
|
Re: [Edapt] A question about custom migration [message #1463426 is a reply to message #1461129] |
Thu, 06 November 2014 09:51   |
Eclipse User |
|
|
|
Hi,
before and after in this case refers to before and after the change
operation the custom migration is attached to, NOT the full migration of
the release. This seems to be ambiguous in the JavaDoc, could you please
open a Bugzilla if you think so. Thanks!
Cheers,
Maximilian
Am 04.11.2014 09:28, schrieb Olivier Prouvost:
>
> It seems to be a problem with the CustomMigration. Javadoc says that
> CustomeMigration::migrateBefore is called before metamodel is changed,
> and migrateAfter after metamodel is changed.
> BUT If we put a CustomMigration at the beginning of a release, the
> metamodel is not changed in the both Methods ! For the method
> migrateBefore this is ok, but not for migrateAfter !
> If we put it a the end of the release, the metamodel received in both
> method is the metamodel changed !
> Is there a specific usage I missed ? I work with the latest release
> (1.0.0.201410271332).
>
>
--
Maximilian Kögel
Get Professional Eclipse Support: http://eclipsesource.com/munich
|
|
|
|
Re: [Edapt] A question about custom migration [message #1467828 is a reply to message #1463750] |
Mon, 10 November 2014 05:44  |
Eclipse User |
|
|
|
Hi,
no, you need to attach a custom migration to the operations that destroy
information and read in the data before and write out the data after the
migration in the implementation of these custom migrations. In your case
probably the two deletes.
Best regards,
Maximilian
Am 06.11.2014 23:19, schrieb Olivier Prouvost:
> Ok.
>
> So in my attached sample (customeMigration.png), my Custom Migration will always receive the same metamodel in the before and after method, because it stands at the end of my release ?
>
> It would mean that if we want to store the data in the model before migration, we must have a custom migration at the beginning of the release to remember of the values, and another customMigration at the end of the release to transfer the information ?
>
> Right ?
>
--
Maximilian Kögel
Get Professional Eclipse Support: http://eclipsesource.com/munich
|
|
|
Powered by
FUDForum. Page generated in 0.09380 seconds