Adding field to nested document soft-locks entire DM experience

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.48.0
    • Affects Version/s: None
    • Component/s: Data Modeling
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • Not Needed
    • None
    • Developer Tools

      To reproduce: Create collection using

      db.coll.insertMany([ 
        { subdoc: { a: { b: 1 } } }, 
        { subdoc: null }
      ]);
      

      then sample this collection to create a diagram and click `+` to add a field to `subdoc.a`.

      This results in an edit that fails to apply to the determined schema, since `addFieldToJSONSchema` expects a single schema and not an optional field represented via `anyOf`.

      Because the edit fails to apply, no data modeling screen continues to work, and the only way to get out of this "soft lock" is to remove the offending data modeling file from disk and then restart Compass.

            Assignee:
            Paula Stachova
            Reporter:
            Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: