From 92e01691d17d777274bf6495b66bbef61903005c Mon Sep 17 00:00:00 2001 From: Ricardo Gama Date: Wed, 15 Jun 2016 11:58:11 +0100 Subject: [PATCH] Release 1.0.4 --- CHANGELOG.md | 15 ++++++++++++++- dist/index.js | 2 +- package.json | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba765f2..74d11f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,20 @@ # Changelog -## [1.0.3](https://github.com/seegno/bookshelf-cascade-delete/tree/1.0.3) +## [1.0.4](https://github.com/seegno/bookshelf-cascade-delete/tree/1.0.4) +[Full Changelog](https://github.com/seegno/bookshelf-cascade-delete/compare/1.0.3...1.0.4) + +**Closed issues:** + +- Destroying with where clause [\#14](https://github.com/seegno/bookshelf-cascade-delete/issues/14) + +**Merged pull requests:** + +- Update README.md contributing section [\#18](https://github.com/seegno/bookshelf-cascade-delete/pull/18) ([abelsoares](https://github.com/abelsoares)) +- Fix cascade delete with queried models [\#17](https://github.com/seegno/bookshelf-cascade-delete/pull/17) ([ricardogama](https://github.com/ricardogama)) +- Add a test file for each database engine [\#16](https://github.com/seegno/bookshelf-cascade-delete/pull/16) ([ricardogama](https://github.com/ricardogama)) + +## [1.0.3](https://github.com/seegno/bookshelf-cascade-delete/tree/1.0.3) (2016-06-14) [Full Changelog](https://github.com/seegno/bookshelf-cascade-delete/compare/1.0.2...1.0.3) **Closed issues:** diff --git a/dist/index.js b/dist/index.js index afc7a97..2fb8e5b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -38,7 +38,7 @@ exports.default = function (Bookshelf) { cascadeDelete: function cascadeDelete(transaction, options) { var _this = this; - return (0, _bluebird.mapSeries)(this.constructor.recursiveDeletes(this.get(this.idAttribute), options), function (query) { + return (0, _bluebird.mapSeries)(this.constructor.recursiveDeletes(this.get(this.idAttribute) || this._knex.column(this.idAttribute), options), function (query) { return query(transaction); }).then(function () { return Model.destroy.call(_this, (0, _extends4.default)({}, options, { diff --git a/package.json b/package.json index b282575..4987d48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bookshelf-cascade-delete", - "version": "1.0.3", + "version": "1.0.4", "description": "Cascade delete with Bookshelf.js", "license": "MIT", "author": {