不要怂,就是干,撸起袖子干!

Commit 3d338922 by Shoshomiga

Fix where with sequelize.fn

1 parent f5fc5010
......@@ -1656,7 +1656,7 @@ module.exports = (function() {
}
}
if (value && value._isSequelizeMethod) {
if (value && value._isSequelizeMethod && !(key !== undefined && value instanceof Utils.fn)) {
return this.handleSequelizeMethod(value);
}
......
......@@ -463,5 +463,13 @@ suite(Support.getTestDialectTeaser('SQL'), function() {
});
});
}
suite('fn', function () {
test('{name: this.sequelize.fn(\'LOWER\', \'DERP\')}', function () {
expectsql(sql.whereQuery({name: this.sequelize.fn('LOWER', 'DERP')}), {
default: "WHERE [name] = LOWER('DERP')"
});
});
});
});
});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!