Comparing version 3.2.1 to 3.2.2
@@ -0,1 +1,4 @@ | ||
### v3.2.2 | ||
- Fix the fix in [#761](../../issues/761) so that it works with custom keys ([#762](../../issues/762)) | ||
### v3.2.1 | ||
@@ -2,0 +5,0 @@ - Fix has many 'has' accessor failing when join table has duplicate entries ([#761](../../issues/761)) |
@@ -188,6 +188,12 @@ var _ = require("lodash"); | ||
var foundItemsIDs = _(foundItems).map('id').uniq().value(); | ||
var InstancesIDs = _(Instances ).map('id').uniq().value(); | ||
var mapKeysToString = function (item) { | ||
return _.map(association.model.keys, function (k) { | ||
return item[k]; | ||
}).join(',') | ||
} | ||
var sameLength = foundItemsIDs.length == InstancesIDs.length; | ||
var foundItemsIDs = _(foundItems).map(mapKeysToString).uniq().value(); | ||
var InstancesIDs = _(Instances ).map(mapKeysToString).uniq().value(); | ||
var sameLength = foundItemsIDs.length == InstancesIDs.length; | ||
var sameContents = sameLength && _.isEmpty(_.difference(foundItemsIDs, InstancesIDs)); | ||
@@ -194,0 +200,0 @@ |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version" : "3.2.1", | ||
"version" : "3.2.2", | ||
"license" : "MIT", | ||
@@ -18,0 +18,0 @@ "homepage" : "http://dresende.github.io/node-orm2", |
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
241981
6027
61