0

我定义了这个架构(集合:ReleaseForms):

  Diseases:{
        type: [Object], 
        optional:true
    },
    "Diseases.$.name": {
          type: String,
          optional:true
      },
    "Diseases.$.description": {
          type: String,
          optional:true
      },
    "Diseases.$.language": {
          type: String,
          optional:true
      },

并在示例中添加了以下内容:

ReleaseForms.update({
  "_id": idNewReleaseForm},
  {
    $push:{
      Diseases:{
        name:"Blutverdünnungstherapie",
        description:"xxxxxxxxxxxx",
        language: "de"
      }
    },
  });

如果我通过 Autoform 查看并说更新,它不会向我显示现有对象,例如 (Blutverdünnungstherapie):但是“名称”显示名称的现有条目!

{{#autoForm collection="ReleaseForms" id="afUpdateReleaseForm" type="update" doc=selectedReleaseFormDoc}}
    <fieldset>
{{> afQuickField name="Name"}}
    {{> afArrayField name="Diseases"}}
    </fieldset>
        <button type="submit" class="btn btn-primary">Update</button>
    {{/autoForm}}

我该怎么做才能看到现有的疾病条目并允许我对其进行编辑?

4

0 回答 0