Logging Database Changes in Mendix

6
I'm probably kicking in an open door here, but how do you enable logging all database changes in your application? I am facing a really perculiar issue where user-objects get deleted during logging in. I have no delete behaviour whatsoever, nor do I have java actions running where deletes can occur. I was hoping with a complete logging of all DB changes I can find out more about this problem. Thanks!
asked
3 answers
2

Make sure the objects are actually being committed to the database. Sometimes, depending on the browser, things can live in your cache until you log out and log back in. If you can, run a query on your db to ensure everything committed properly.

Depending on what SQL platform you are using, you may be able to run a profiler, such as SQL Profiler, to see all the transactions that are occurring real time.

Double check your domain models. I've made the mistake of placing the wrong multiplicity on objects that relate to user accounts, or have the association going in the wrong direction. This can seem like objects are being deleted as well.

answered
1

There is an app audittrail where you can track changes. But your problem can be solved I think by using the advanced find option and select microflow actions. Here you can select Delete and you will find any microflow delete actions of that object. Try that first before you take some more drastic step of the audittrail module. This module is not an easy integration.

Regards,

Ronald

answered
1

You can set the loglevels for the connectionbus to TRACE. This will give you all queries that are performed on the DB.

answered