         optional:
           _id: @person3._id
           username: @person3.username
+        slug: 'nested-prefix-foobar-nestedfoobar-suffix'
         body: 'NestedFooBar'
       ]
       body: 'FooBar'
       slug: 'prefix-foobar-subdocumentfoobar-suffix'
+      tags: [
+        'tag-0-prefix-foobar-subdocumentfoobar-suffix'
+        'tag-1-prefix-foobar-nestedfoobar-suffix'
+      ]
 
     Persons.update @person1Id,
       $set:

      reviewers: [@ReferenceField Person, [username: 1]]
      subdocument:
        person: @ReferenceField Person, ['username'], false
      nested: [
        required: @ReferenceField Person, ['username']
        optional: @ReferenceField Person, ['username'], false
      ]
      slug: @GeneratedField 'self', ['body', 'subdocument.body'], (fields) ->
        if _.isUndefined(fields.body) or _.isUndefined(fields.subdocument?.body)

  test.equal Post.Meta.fields.subdocument.persons.sourceDocument.Meta.collection, Posts
  test.equal Post.Meta.fields.subdocument.persons.targetDocument.Meta.collection, Persons
  test.equal Post.Meta.fields.subdocument.persons.fields, ['username']
  test.equal _.size(Post.Meta.fields.nested), 3
  test.equal Post.Meta.fields.nested.required.ancestorArray, 'nested'
  test.isTrue Post.Meta.fields.nested.required.required
  test.equal Post.Meta.fields.nested.required.sourcePath, 'nested.required'
