You should never directly work on the Mendix tables. Mendix is managing all the IDs. Changing something by not doing that via Mendix runtime can cause errors.
What is your usecase? I am pretty sure there is a solution that does not need the help of database connector.
Hi Andreas,
The use case requires our Mendix based application to copy data from external applications. This is on a regular basis. I initially used Database Connector/Excel Import for initial data. I cannot do this step on a regular basis, hence the need to use a loader that copies data from external to Mendix tables.
Is there an alternative way of doing this?
Hi,
so you need to retrieve data from an external database and store it in your mendix database. You could use database connector to retrieve the data from the external database. Now you have a list of objects in your microflow. Iterate over this list, creat objects from your domain model, copy the information to those objects and commit them. No need to insert data into your mendix database by using database connector.
Hi Andreas,
That is what I am currently doing but I am seeing a performance issue on it. I am loading at a minimum 5000 new rows and it is taking time to create all those objects. I also have experience a scenario where Mendix timeout processing the thousand rows.
I highly recommend doing it in batches.
There are multiple best practices.
If it is still too much, you may need to make use of the process queue to ensure that your jobs run in different transactions.
Hi Andreas,
Thanks for the tip and I will give it a try.