Use Mendix java api and truncate to clean up table.

I would love to use truncate to clean up certain big tables in lower environments using the Mendix java api. What precautions should we need to consider?
1 answers

Hello Hari,


Some things that you need to consider from top of my head:


1. Entities that are generalization or specializations, basically everything that inherits should be deleted with care, because they have entries in two or more tables

2. Associations and association tables need to be handled with care because in some cases you do not want to have unreferenced data that is somewher in your database

3. Deleting cannot be undone anymore, sounds straight forward but be aware once thrown away you cannot get it back with control z, however you can make a back up to be sure

4. Check your code before you delete and be sure you delete the objects that need to be deleted and that you do not have unexpected side effects.


Hope this helps 


Good luck