Comparing version 2.1.20 to 2.1.21
@@ -0,1 +1,6 @@ | ||
### v2.1.21 | ||
- Fix mixed case uniqueness constraint on postgres (#597) | ||
- Fix mongo adapter association delete (#543) | ||
- Fix mongo ne/eq comparators for _id key (#586) | ||
### v2.1.20 - 19 Nov 2014 | ||
@@ -2,0 +7,0 @@ - Exposing dirty properties array on the instance (#575) |
@@ -319,3 +319,9 @@ var Utilities = require("../../Utilities"); | ||
for (var i = 0; i < Associations.length; i++) { | ||
pull[association.name].push({ _id: Associations[i][association.model.id] }); | ||
var props = {_id: Associations[i][association.model.id]}; | ||
if (Associations[i].extra !== undefined) { | ||
props = _.merge(props, _.pick(Associations[i].extra, _.keys(association.props))); | ||
} | ||
pull[association.name].push(props); | ||
} | ||
@@ -400,3 +406,3 @@ | ||
if (value && typeof value.sql_comparator == "function") { | ||
var val = (key != "_id" ? value : new mongodb.ObjectID(value)); | ||
var val = (key != "_id" ? value.val : new mongodb.ObjectID(value.val)); | ||
var comp = value.sql_comparator(); | ||
@@ -411,13 +417,13 @@ var condition = {}; | ||
case "ne": | ||
condition["$" + comp] = val.val; | ||
condition["$" + comp] = val; | ||
break; | ||
case "eq": | ||
condition = val.val; | ||
condition = val; | ||
break; | ||
case "between": | ||
condition["$min"] = val.from; | ||
condition["$max"] = val.to; | ||
condition["$min"] = value.from; | ||
condition["$max"] = value.to; | ||
break; | ||
case "like": | ||
condition["$regex"] = val.expr.replace("%", ".*"); | ||
condition["$regex"] = value.expr.replace("%", ".*"); | ||
break; | ||
@@ -424,0 +430,0 @@ } |
@@ -80,3 +80,3 @@ var enforce = require("enforce"); | ||
query = util.format('LOWER(%s.%s) LIKE LOWER(?)', | ||
ctx.model.table, ctx.driver.query.escapeId(prop) | ||
ctx.driver.query.escapeId(ctx.model.table), ctx.driver.query.escapeId(prop) | ||
); | ||
@@ -83,0 +83,0 @@ chain.where(query, [value]); |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version" : "2.1.20", | ||
"version" : "2.1.21", | ||
"license" : "MIT", | ||
@@ -41,3 +41,3 @@ "homepage" : "http://dresende.github.io/node-orm2", | ||
"enforce" : "0.1.5", | ||
"sql-query" : "git+https://github.com/dresende/node-sql-query.git#v0.1.23", | ||
"sql-query" : "0.1.24", | ||
"sql-ddl-sync" : "git+https://github.com/dresende/node-sql-ddl-sync.git#v0.3.10", | ||
@@ -44,0 +44,0 @@ "hat" : "0.0.3", |
@@ -477,2 +477,3 @@ ## Object Relational Mapping | ||
{ col1: orm.not_like(12 + "%") } // `col1` NOT LIKE '12%' | ||
{ col1: orm.not_in([1, 4, 8]) } // `col1` NOT IN (1, 4, 8) | ||
``` | ||
@@ -479,0 +480,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
232800
5951
862
1
+ Addedsql-query@0.1.24(transitive)
Updatedsql-query@0.1.24