Skip to content

Entity (EDM) editor loses the "Not null" state on load, and silently drops NOT NULL on re-save #6332

Description

@NicoleNG18

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

  1. In an intent project, author an entity with a required field (e.g. - { name: title, type: string, required: true }) in app.intent.
  2. Open the intent and click Generate — this writes .edm + .model at the project root.
  3. Double-click the generated .edm to open it in the Entity Data Modeler, select the entity, and open the required property's details.
  4. Observe: "Required" is checked but "Not null" is unchecked, despite the file's <property … dataNullable="false">.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions