Use findById to look up the instance by id
This commit is contained in:
parent
e8ac3a960f
commit
534cc4af2f
|
@ -48,7 +48,7 @@ Model.setup = function () {
|
|||
} else if(data) {
|
||||
fn(null, new ModelCtor(data));
|
||||
} else if(id) {
|
||||
ModelCtor.find(id, function (err, model) {
|
||||
ModelCtor.findById(id, function (err, model) {
|
||||
if(err) {
|
||||
fn(err);
|
||||
} else if(model) {
|
||||
|
|
Loading…
Reference in New Issue