@bedrockio/model 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -146,6 +146,7 @@ function applyValidation(schema, definition) {
146
146
  });
147
147
  schema.static('getBaseSchema', function getBaseSchema() {
148
148
  return getSchemaFromMongoose(schema, {
149
+ model: this,
149
150
  stripDeleted: true,
150
151
  requireReadAccess: true
151
152
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/validation.js CHANGED
@@ -163,6 +163,7 @@ export function applyValidation(schema, definition) {
163
163
 
164
164
  schema.static('getBaseSchema', function getBaseSchema() {
165
165
  return getSchemaFromMongoose(schema, {
166
+ model: this,
166
167
  stripDeleted: true,
167
168
  requireReadAccess: true,
168
169
  });
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.js"],"names":[],"mappings":"AAiFA,kDAEC;AAED,oEAoFC;AAsBD,wEAkBC;AAySD;;;EAEC;AAED;;;EAOC;AAnfD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQK"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.js"],"names":[],"mappings":"AAiFA,kDAEC;AAED,oEAqFC;AAsBD,wEAkBC;AAySD;;;EAEC;AAED;;;EAOC;AApfD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQK"}