Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

orm

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orm - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

3

Changelog.md

@@ -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))

12

lib/Associations/Many.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc