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) {
|
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 {
|
||||||
|
|
Loading…
Reference in New Issue