@oridune/epic-odm
Advanced tools
Comparing version 1.0.20 to 1.0.21
{ | ||
"name": "@oridune/epic-odm", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "Install 1 ODM and code once with any database driver.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -66,6 +66,5 @@ "use strict"; | ||
ModelOptions.relations[Key]) { | ||
const Validated = await this.resolveSchema(ModelOptions.relations[Key].reference(), [Item[Key]], options); | ||
Item[Key] = ["ManyToMany", "OneToMany"].includes(ModelOptions.relations[Key].type) | ||
? Validated | ||
: Validated[0]; | ||
const Many = Item[Key] instanceof Array; | ||
const Validated = await this.resolveSchema(ModelOptions.relations[Key].reference(), Many ? Item[Key] : [Item[Key]], options); | ||
Item[Key] = Many ? Validated : Validated[0]; | ||
} | ||
@@ -72,0 +71,0 @@ else if (ModelOptions.fields[Key] || ModelOptions.metas[Key]) |
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
95600
1941