Comparing version 7.5.4 to 7.6.0
@@ -71,3 +71,9 @@ 'use strict'; | ||
} | ||
val[k] = cast(schema, val[k], options, context); | ||
const discriminatorValue = val[k][schema.options.discriminatorKey]; | ||
if (discriminatorValue == null) { | ||
val[k] = cast(schema, val[k], options, context); | ||
} else { | ||
const discriminatorSchema = getSchemaDiscriminatorByValue(context.schema, discriminatorValue); | ||
val[k] = cast(discriminatorSchema ? discriminatorSchema : schema, val[k], options, context); | ||
} | ||
} | ||
@@ -307,3 +313,2 @@ } else if (path === '$where') { | ||
let $cond; | ||
let k = ks.length; | ||
@@ -310,0 +315,0 @@ |
@@ -1218,3 +1218,2 @@ 'use strict'; | ||
} | ||
// do not cast until all setters are applied #665 | ||
@@ -1221,0 +1220,0 @@ v = this.cast(v, scope, init, priorVal, options); |
{ | ||
"name": "mongoose", | ||
"description": "Mongoose MongoDB ODM", | ||
"version": "7.5.4", | ||
"version": "7.6.0", | ||
"author": "Guillermo Rauch <guillermo@learnboost.com>", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
"kareem": "2.5.1", | ||
"mongodb": "5.8.1", | ||
"mongodb": "5.9.0", | ||
"mpath": "0.9.0", | ||
@@ -27,0 +27,0 @@ "mquery": "5.0.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2663526
50079
+ Addedmongodb@5.9.0(transitive)
- Removedmongodb@5.8.1(transitive)
Updatedmongodb@5.9.0