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

Commit 09b8f51f by Sascha Depold

use IS NULL in where clause

1 parent 29efe954
Showing with 3 additions and 1 deletions
......@@ -89,7 +89,9 @@ SequelizeHelper = {
else {
var result = []
SequelizeHelper.Hash.forEach(conditions, function(value, key) {
result.push(key + "=" + SequelizeHelper.SQL.transformValueByDataType(value, attributes[key]))
var _value = SequelizeHelper.SQL.transformValueByDataType(value, attributes[key])
if(_value == 'NULL') result.push(key + " IS NULL")
else result.push(key + "=" + _value)
})
return result.join(" AND ")
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!