@travetto/model
Advanced tools
Comparing version 3.3.4 to 3.3.5
{ | ||
"name": "@travetto/model", | ||
"version": "3.3.4", | ||
"version": "3.3.5", | ||
"description": "Datastore abstraction for core operations.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -78,13 +78,10 @@ import { RootIndex } from '@travetto/manifest'; | ||
delete view[schema.subTypeField].required; // Allow type to be optional | ||
let parent = this.getParentClass(cls); | ||
let from = cls; | ||
// Merge inherited prepersist/postload | ||
while (parent && from !== parent) { | ||
const pCfg = this.get(parent); | ||
config.prePersist = [...pCfg.prePersist ?? [], ...config.prePersist ?? []]; | ||
config.postLoad = [...pCfg.postLoad ?? [], ...config.postLoad ?? []]; | ||
from = parent; | ||
parent = this.getParentClass(from); | ||
} | ||
} | ||
const parent = this.getParentClass(cls); | ||
if (parent && parent !== cls) { | ||
const pCfg = this.get(parent) ?? this.pending.get(MetadataRegistry.id(parent)); | ||
config.prePersist = [...pCfg.prePersist ?? [], ...config.prePersist ?? []]; | ||
config.postLoad = [...pCfg.postLoad ?? [], ...config.postLoad ?? []]; | ||
} | ||
return config; | ||
@@ -91,0 +88,0 @@ } |
@@ -94,2 +94,3 @@ import assert from 'assert'; | ||
assert(doc instanceof Doctor); | ||
assert(doc.updatedDate !== undefined); | ||
@@ -96,0 +97,0 @@ await assert.rejects( |
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
160324
2975