Fix the model prop lookup
This commit is contained in:
parent
22db369fb8
commit
588b328e62
|
@ -247,7 +247,7 @@ BaseSQL.prototype.count = function count(model, callback, where) {
|
|||
function buildWhere(conds) {
|
||||
var cs = [];
|
||||
Object.keys(conds || {}).forEach(function (key) {
|
||||
var keyEscaped = self.columnEscaped(key);
|
||||
var keyEscaped = self.columnEscaped(model, key);
|
||||
if (conds[key] === null) {
|
||||
cs.push(keyEscaped + ' IS NULL');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue