adonis-lucid-mongodb
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"scripts": { | ||
@@ -11,0 +11,0 @@ "lint": "standard", |
@@ -126,3 +126,3 @@ 'use strict' | ||
* fetch () { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey)).fetch() | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).fetch() | ||
} | ||
@@ -138,3 +138,3 @@ | ||
* find (id) { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey)).find(id) | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).find(id) | ||
} | ||
@@ -150,3 +150,3 @@ | ||
* first () { | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent.get(this.toKey)).first() | ||
return yield this.relatedQuery.whereIn(this.fromKey, this.parent[this.toKey] || []).first() | ||
} | ||
@@ -153,0 +153,0 @@ |
233031