use column default for not null prop
This commit is contained in:
parent
7e15bd567d
commit
1626141abf
|
@ -1114,9 +1114,17 @@ SQLConnector.prototype._buildWhere = function(model, where) {
|
|||
// Column value is a list
|
||||
for (var j = 0, m = expression.length; j < m; j++) {
|
||||
columnValue.push(this.toColumnValue(p, expression[j]));
|
||||
if (columnValue[j].sql && columnValue[j].sql.match(/DEFAULT\(\?\)/)) {
|
||||
columnValue[j].params.pop();
|
||||
columnValue[j].params.push(columnName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
columnValue.push(this.toColumnValue(p, expression));
|
||||
if (columnValue.sql && columnValue.sql.match(/DEFAULT\(\?\)/)) {
|
||||
columnValue.params.pop();
|
||||
columnValue.params.push(columnName);
|
||||
}
|
||||
}
|
||||
if (operator === 'between') {
|
||||
// BETWEEN v1 AND v2
|
||||
|
|
Loading…
Reference in New Issue