Niclas Hedhman wrote:
To the point that my head is hurting.... ;-)

I am not convinced that the fluent API is 'nice', compared to for
instance a "Migration" interface that one needs to implement and
register as a "from versionA to versionB" which would have a method to
be called (probably by UoW) on each non-uptodate entity state.

That would be the custom migration case:

migration.toVersion("2.0").onEntity("Foo").custom(new MyMigrator());

The custom migrator will get the state as JSON (which includes current version), and the version which we want to get to.

Note that for most non-custom migrations it could/should be possible to do them in reverse as well. So if you have data with "1.1" versions and deploy them in a "1.0" application it would be possible to downgrade the application if the rules are of add/rename character. Only custom and remove rules will make it impossible to downgrade.

/Rickard


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to