Describe the bug
Open an intent-generated .edm in the entity modeler and inspect a required field: "Required" is checked, but "Not null" is not — even though the file carries dataNullable="false". Re-saving then writes the column back as nullable, silently dropping the NOT NULL constraint. A hand-modeled .edm does not have this problem — it round-trips correctly.
This affects every column the intent marks NOT NULL: required scalar fields, primary keys, and required/composition foreign keys alike.
To Reproduce
- In an intent project, author an entity with a required field (e.g. - { name: title, type: string, required: true }) in app.intent.
- Open the intent and click Generate — this writes .edm + .model at the project root.
- Double-click the generated .edm to open it in the Entity Data Modeler, select the entity, and open the required property's details.
- Observe: "Required" is checked but "Not null" is unchecked, despite the file's <property … dataNullable="false">.
- Make any edit and Save (or just re-save), then reopen the .edm source: the property is now dataNullable="true" — the NOT NULL constraint has been silently dropped.
Expected behavior
An intent-generated .edm should behave identically to a hand-modeled one: a required column shows "Not null" checked on load, and re-saving preserves dataNullable="false". Regenerating and hand-editing the EDM must never silently drop a NOT NULL constraint.
Describe the bug
Open an intent-generated .edm in the entity modeler and inspect a required field: "Required" is checked, but "Not null" is not — even though the file carries dataNullable="false". Re-saving then writes the column back as nullable, silently dropping the NOT NULL constraint. A hand-modeled .edm does not have this problem — it round-trips correctly.
This affects every column the intent marks NOT NULL: required scalar fields, primary keys, and required/composition foreign keys alike.
To Reproduce
Expected behavior
An intent-generated .edm should behave identically to a hand-modeled one: a required column shows "Not null" checked on load, and re-saving preserves dataNullable="false". Regenerating and hand-editing the EDM must never silently drop a NOT NULL constraint.