adonis-lucid-mongodb
Advanced tools
Comparing version 1.0.28 to 1.0.29
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"scripts": { | ||
@@ -11,0 +11,0 @@ "lint": "standard", |
@@ -126,3 +126,3 @@ 'use strict' | ||
* fetch () { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).fetch() | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey) || []).fetch() | ||
} | ||
@@ -138,3 +138,3 @@ | ||
* find (id) { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).find(id) | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey) || []).find(id) | ||
} | ||
@@ -150,6 +150,17 @@ | ||
* first () { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).first() | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey) || []).first() | ||
} | ||
/** | ||
* fetch | ||
* | ||
* @public | ||
* | ||
* @return {Object} | ||
*/ | ||
* update (values) { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey) || []).update(values) | ||
} | ||
/** | ||
* belongsTo cannot have paginate, since it | ||
@@ -317,3 +328,3 @@ * maps one to one relationship | ||
} else { | ||
return yield this.relatedQuery.where(this.fromKey, reference).delete() | ||
return yield this.relatedQuery.whereIn(this.fromKey, reference).delete() | ||
} | ||
@@ -320,0 +331,0 @@ } |
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
235660
8343