Use findById to look up the instance by id

This commit is contained in:
Raymond Feng 2013-08-16 22:11:58 -07:00
parent e8ac3a960f
commit 534cc4af2f
1 changed files with 1 additions and 1 deletions

View File

@ -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) {