Comparing version 0.7.5 to 0.7.6
@@ -1,2 +0,2 @@ | ||
// Bookshelf.js 0.7.5 | ||
// Bookshelf.js 0.7.6 | ||
// --------------- | ||
@@ -18,3 +18,3 @@ | ||
var bookshelf = { | ||
VERSION: '0.7.5' | ||
VERSION: '0.7.6' | ||
}; | ||
@@ -21,0 +21,0 @@ |
@@ -84,2 +84,4 @@ // Base Model | ||
// unless `{shallow: true}` is passed in the `options`. | ||
// Also includes _pivot_ keys for relations unless `{omitPivot: true}` | ||
// is passed in `options`. | ||
toJSON: function(options) { | ||
@@ -91,4 +93,5 @@ var attrs = _.extend({}, this.attributes); | ||
var relation = relations[key]; | ||
attrs[key] = relation.toJSON ? relation.toJSON() : relation; | ||
attrs[key] = relation.toJSON ? relation.toJSON(options) : relation; | ||
} | ||
if (options && options.omitPivot) return attrs; | ||
if (this.pivot) { | ||
@@ -178,2 +181,2 @@ var pivot = this.pivot.attributes; | ||
module.exports = ModelBase; | ||
module.exports = ModelBase; |
{ | ||
"name": "bookshelf", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"description": "A lightweight ORM for PostgreSQL, MySQL, and SQLite3", | ||
@@ -5,0 +5,0 @@ "main": "bookshelf.js", |
Sorry, the diff of this file is too big to display
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
1156573
31353