Fix the model prop lookup

This commit is contained in:
Raymond Feng 2013-07-21 17:27:31 -07:00
parent 22db369fb8
commit 588b328e62
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ BaseSQL.prototype.count = function count(model, callback, where) {
function buildWhere(conds) { function buildWhere(conds) {
var cs = []; var cs = [];
Object.keys(conds || {}).forEach(function (key) { Object.keys(conds || {}).forEach(function (key) {
var keyEscaped = self.columnEscaped(key); var keyEscaped = self.columnEscaped(model, key);
if (conds[key] === null) { if (conds[key] === null) {
cs.push(keyEscaped + ' IS NULL'); cs.push(keyEscaped + ' IS NULL');
} else { } else {