Comparing version 0.6.18 to 0.6.19
@@ -287,3 +287,3 @@ !function () { | ||
/* | ||
@@ -349,2 +349,3 @@ * check if this resource is selected, if yes, make sure all | ||
if (sourceResource.hasFiltersForTheRootResource() && resource && !resource.isRootResource() && !sourceResource.parentsFiltered) { | ||
@@ -354,4 +355,7 @@ var name = sourceResource.query.from | ||
if (debug) log.debug('applying filters on %s to the parent %s ...', sourceResource.name, resource.name); | ||
if (debug) log.debug('applying join on %s to %s ...'.cyan, sourceResource.name, resource.name); | ||
if (!joins) joins = sourceResource.joins.slice().reverse(); | ||
@@ -371,2 +375,3 @@ | ||
joins.forEach(function(joinStatement, index) { | ||
@@ -377,7 +382,7 @@ resource.query.join.push(joinStatement.reverseFormat()); | ||
// we should not join any table twice | ||
if (resource.subJoinApplied) { | ||
if (sourceResource.subJoinApplied) { | ||
this.applyFiltersToParents(resource.getParent(), sourceResource, joins, resource); | ||
} | ||
else { | ||
resource.subJoinApplied = true; | ||
sourceResource.subJoinApplied = true; | ||
this.applyFiltersToParents(resource.getParent(), sourceResource, resource.joins.reverse().concat(joins), resource); | ||
@@ -597,2 +602,4 @@ } | ||
if (!this.isRootResource() && !this.joinApplied()) { | ||
if (debug) log.info('Applying join from %s to %s ...'.magenta, this.name, this.getParent().name); | ||
// do the same on my parent | ||
@@ -599,0 +606,0 @@ this.getParent().addJoinsToRootResource(leftJoin); |
{ | ||
"name" : "ee-orm" | ||
, "description" : "An easy to use ORM for node.js. Supports eager loading, complex queries, joins, transactions, complex database clusters & connection pooling." | ||
, "version" : "0.6.18" | ||
, "version" : "0.6.19" | ||
, "homepage" : "https://github.com/eventEmitter/ee-orm" | ||
@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)" |
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
250252
4771