Associated entity object got deleting after some time

0
Hi All,In my project we have observed the following issue, the issue is we have one main object and that main object has association with another entity as [*-*]. If we use the application and if we attach values based on the association that mean multiples assciated objects can assign multiple main objects and if we save in application those values are storing and displaying in application page and in database as well. Here we are setting associations and later we are commiting mainobject there is no where commiting associated object because mendix will save associated object along with the main object commit that is the reason we are following the same way in save microflow, but after some time nearly one hour those associated values got deleted and emtpy list is showing in the application and database as well. i have verfied is there any schedulers are running to cause this issue but nothing is there but this issue is happening. If any one have any idea kindly share with me that will be help ful.Thanks & Regards,Ramakrishna. A
asked
1 answers
1

The associated objects are probably (only) autocommited, which means they'll be deleted when the session is killed or the user logs out. As long as the session is active, the changes seem to be made, but when the session ends autocommitted stuff is reverted. You should see this in the log.

Mendix claims autocommits prevent data inconsistencies, while many experience quite the opposite, which is why this idea has existed since the dawn of time.

Anyway, when creating objects make sure you explicitly commit them and don't rely on autocommits.

answered