Loading Reference Data From Model

Hi I've looked through the forums and haven't found an answer to this, so apologies if it has been answered elsewhere (add the link if this is answered somewhere else). I have an app with a lot of reference data tables which take a while to build up and are a pain to redo when the database gets trashed. How do you set up the model to pre populate the database with reference data? If this were a MySQL database I could build my model then add my inserts and have the database up and ready on the completion of the build. Thanks
2 answers

You could take a look at the country module for an example. Basicly you have to create a microflow that retrieves the record and if it is not there creates it. This way we build in our app all kinds of standard tables. The microflow could take you a bit of time to build but the advantage is that you only have to do it once.




For my own application I have had to spend considerable time developing import-export to XML functionality for most of my configuration data (similar to the workflow in the Excel Importer module that allows you to export and import templates). In my own app this includes SLA configurations, ticket categorization data, status and status transition data, working hours definitions, teams and staff data, forms and reports data etc. All of this data is highly normalized, so is not suitable for flat excel imports.

What is really needed is a generic XML export-Import module that can handle references and self-references properly. It looks like someone was working on this (Bart Groot, but he has had no activity recently so may have moved on :( ) http://bartgroot.nl/mendix/generic-mendix-data-exporterimporter/. Has anyone managed to implement something similar to this?