* DocumentArrayElement SchemaType constructor. * * @param {String} path * @param {Object} options * @inherits SchemaType * @api public
(path, options)
| 19 | */ |
| 20 | |
| 21 | function DocumentArrayElement(path, options) { |
| 22 | this.$parentSchemaType = options && options.$parentSchemaType; |
| 23 | if (!this.$parentSchemaType) { |
| 24 | throw new MongooseError('Cannot create DocumentArrayElement schematype without a parent'); |
| 25 | } |
| 26 | delete options.$parentSchemaType; |
| 27 | |
| 28 | SchemaType.call(this, path, options, 'DocumentArrayElement'); |
| 29 | |
| 30 | this.$isMongooseDocumentArrayElement = true; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * This schema type's name, to defend against minifiers that mangle |
nothing calls this directly
no outgoing calls
no test coverage detected