Have the option for not having default values in attributes when generation a domain model from a mapping - Mendix Forum

Have the option for not having default values in attributes when generation a domain model from a mapping

12

With the auto mapping option, the desktop modeler generates all the entities needed with the specific attributes and data types. Certain attributes have a default value like an Integer, which is 0. However, in an integration, I do not want this, since a default value of 0 has another meaning than 'empty' or 'null'.

1. Please disable this behaviour for this auto-generating functionality
2. Please make it possible in the settings to adjust this behavior. 

Thanks. 

asked
2 answers

Make this a setting at project level. By setting or removing the default value of an attribute your whole app can behave differently. The default value is an implicit setting which is bad software engineering. Make it explicit and a lot of problems caused by implicit expectations are solved.

Created

When you create a new integer attribute in an entity, it has default value 0 as well.

Does you idea include not setting a default value there, too?

Created