Arjan van IJzendoorn on April 24, 2012
Domain model changes lead to updates of the database. For example, when you add an entity to a domain model, a table is automatically created in the database the next time that you deploy your project. Creating attributes in the model leads to columns in the database and associations lead to link tables. Deleting elements from the domain model result in database altering (DDL) commands that, when executed, will delete tables and columns. As explained in an earlier tech-tip, you should not edit the database by hand.
In Mendix 3.0 and above, entities, associations and attributes are internally identified by a unique number instead of a name. This helps us to keep track of creates, renames and deletes much better than in version 2.5. It does have some consequences of which you need to be aware:
The common theme of this post is that deleting domain model elements or whole modules will delete all corresponding data in the database, even if you re-create something with the same name. Use one of the offered alternatives to keep data intact and check the DDL commands when deploying to an environment with valuable data!
Receive Mendix platform tips, tricks, and other resources straight to your inbox every two weeks.