Comparing version 1.0.3 to 1.0.4
@@ -0,1 +1,5 @@ | ||
## 1.0.4/2016-03-22 | ||
- update `.populate` can pass model instead of modelName | ||
## 1.0.3/2016-03-14 | ||
@@ -2,0 +6,0 @@ |
@@ -62,3 +62,4 @@ 'use strict'; | ||
} | ||
return this.model(opt.model, null, opt.options) | ||
let model = ('string' === typeof opt.model) ? this.model(opt.model, null, opt.options) : opt.model; | ||
return model | ||
.find(query, options) | ||
@@ -65,0 +66,0 @@ .exec() |
{ | ||
"name": "mongolass", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Elegant MongoDB driver for Node.js.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -94,3 +94,3 @@ 'use strict'; | ||
.populate({ path: '_id', model: 'User' }) | ||
.populate({ path: '_id._id', model: 'User' }) | ||
.populate({ path: '_id._id', model: User }) | ||
.exec() | ||
@@ -97,0 +97,0 @@ .then(results => { |
42184
1093