objection
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -5,3 +5,3 @@ 'use strict'; | ||
, Relation = require('./Relation') | ||
, ownerJoinColumnAlias = '_join_'; | ||
, ownerJoinColumnAlias = 'objectiontmpjoin'; | ||
@@ -95,3 +95,6 @@ /** | ||
builder.runAfterModelCreate(function (related) { | ||
var relatedByOwnerId = _.groupBy(related, ownerJoinColumnAlias); | ||
// The ownerJoinColumnAlias column name may have been changed by the `$parseDatabaseJson` | ||
// method of the related model class. We need to do the same conversion here. | ||
var ownerJoinPropAlias = self.relatedModelClass.columnNameToPropertyName(ownerJoinColumnAlias); | ||
var relatedByOwnerId = _.groupBy(related, ownerJoinPropAlias); | ||
@@ -103,3 +106,3 @@ _.each(owners, function (owner) { | ||
_.each(related, function (rel) { | ||
delete rel[ownerJoinColumnAlias]; | ||
delete rel[ownerJoinPropAlias]; | ||
}); | ||
@@ -106,0 +109,0 @@ |
{ | ||
"name": "objection", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "An SQL-friendly ORM for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "objection.js", |
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
220537
6521