Will I not lose my data when I change the name of an object, association or attribute?
I would like to change the name of an object and one of its attributes in the metamodel. Since the association carries the name of the object I would like to change that as well. However, my application is in production and I don't want to lose any of my data. Can I change those names without losing my date?
When starting the Mendix Runtime you can choose the menu option synchronize modeler file. If the metamodel and the database are not in sync you get the question if you want to sync it automatically or manually (the queries can be written to a file and executed by hand on the database).
Changes in the metamodel are automatically propagated to the database while retaining the data as much as possible. However, not for every change the data can be retained.
Rename of elements: data is retained.
Adding elements: data is retaind.
Removing elements: table elements are renamed to currentname_deleted.
Changing the type of attributes: only if the conversion of data is possible the data is retained (e.g. integer to string is possible, string to date not).
Johan den Haan
Yes, you can!
Changes in the metamodel are propagated to the data database and data is retained. The runtime creates SQL queries to update the database to reflect the metamodel again. Of course, I would recommend always checking your application in a test environment first.