bookshelf-scopes
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "bookshelf-scopes", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Giving you Rails like scopes in Bookshelf.js.", | ||
@@ -5,0 +5,0 @@ "main": "src/scopes.js", |
@@ -51,4 +51,7 @@ 'use strict'; | ||
relationship.relatedData.selectConstraints = function(knex, options) { | ||
originalSelectConstraints.apply(this, arguments); | ||
target.prototype.scopes.default.apply(this, [knex]); | ||
originalSelectConstraints.apply(this, [knex, options]); | ||
if (!knex.appliedDefault) { | ||
knex.appliedDefault = true; | ||
target.prototype.scopes.default.apply(this, [knex, options]); | ||
} | ||
}; | ||
@@ -76,3 +79,6 @@ } | ||
self.query(function(qb) { | ||
self.scopes.default.call(self, qb); | ||
if (!qb.appliedDefault) { | ||
qb.appliedDefault = true; | ||
self.scopes.default.call(self, qb); | ||
} | ||
}); | ||
@@ -79,0 +85,0 @@ } |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
36429
12
871
1