Project property to disallow autocommit - Mendix Forum

Project property to disallow autocommit

26

Provide a project setting to throw a runtime error when an autocommit occurs.

I really don't like autocommits (understatement!) and these are usually cause for hard to spot errors. From my opinion, when an autocommit occurs, the developer made an error. There are many ways to prevent autocommits. 

To prevent a breaking change, I would like to configure in my project that the runtime should not attempt to fix logic errors by doing an autocommit but just throw an error. Any other system I have worked on would do that because you violate a foreign key constraint by referencing a record that does not exist.

I deliberately made a rather strong point here, also hoping to spark a discussion.

asked
2 answers

Hi TIm, I already upvoted that topic.

Created

I consider your comment on auto-commit feature light hearted and upbeat. Lots is wrong with the autocommit feature. For starters the name. Auto-commit does the exact opposite of its name. The name autocommit suggests that ‘autocommit’ would commit the object without explicitly being told so. Instead, it removes the object.

There is no valid reason for auto-commit rolling back committed objects. Saving the not stored object is the better choice.

Please also upvote https://forum.mendix.com/link/ideas/650

Created