()
| 140 | |
| 141 | // compile an embedded document for this schema |
| 142 | function EmbeddedDocument() { |
| 143 | Subdocument.apply(this, arguments); |
| 144 | // `ArraySubdocument` already looked up the parent array's parent doc, so |
| 145 | // reuse it rather than going through the document array proxy again. |
| 146 | const parent = this[documentArrayParent]; |
| 147 | if (parent == null) { |
| 148 | return; |
| 149 | } |
| 150 | this.$session(parent.$session()); |
| 151 | } |
| 152 | |
| 153 | // Must run before `$__setSchema()`, which compiles virtuals onto the prototype |
| 154 | schema.plugin(idGetter, { deduplicate: true }); |
nothing calls this directly
no outgoing calls
no test coverage detected