feathers-sequelize
Advanced tools
Comparing version 2.2.1 to 2.3.0
# Change Log | ||
## [v2.2.1](https://github.com/feathersjs/feathers-sequelize/tree/v2.2.1) (2017-08-08) | ||
[Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v2.2.0...v2.2.1) | ||
**Closed issues:** | ||
- All service methods should take into account the query parameter [\#143](https://github.com/feathersjs/feathers-sequelize/issues/143) | ||
**Merged pull requests:** | ||
- Patch should default to raw queries [\#147](https://github.com/feathersjs/feathers-sequelize/pull/147) ([Ryanthegiantlion](https://github.com/Ryanthegiantlion)) | ||
- Fixing broken docs links [\#144](https://github.com/feathersjs/feathers-sequelize/pull/144) ([corymsmith](https://github.com/corymsmith)) | ||
## [v2.2.0](https://github.com/feathersjs/feathers-sequelize/tree/v2.2.0) (2017-07-24) | ||
@@ -4,0 +16,0 @@ [Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v2.1.0...v2.2.0) |
@@ -147,3 +147,5 @@ 'use strict'; | ||
return result[0]; | ||
}).then((0, _feathersCommons.select)(params, this.id)).catch(utils.errorHandler); | ||
}).then((0, _feathersCommons.select)(params, this.id)).catch(function (error) { | ||
throw new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\'', error); | ||
}); | ||
} | ||
@@ -229,3 +231,6 @@ | ||
options.returning = true; | ||
return Model.update((0, _lodash2.default)(data, this.id), options).then(function (results) { | ||
return this._getOrFind(id, options).then(function (results) { | ||
return _this2.Model.update((0, _lodash2.default)(data, _this2.id), options); | ||
}).then(function (results) { | ||
if (id === null) { | ||
@@ -269,7 +274,5 @@ return results[1]; | ||
var Model = this.applyScope(params); | ||
// Force the {raw: false} option as the instance is needed to properly | ||
// update | ||
return Model.findById(id, { raw: false }).then(function (instance) { | ||
return this._get(id, { sequelize: { raw: false } }).then(function (instance) { | ||
if (!instance) { | ||
@@ -276,0 +279,0 @@ throw new _feathersErrors2.default.NotFound('No record found for id \'' + id + '\''); |
{ | ||
"name": "feathers-sequelize", | ||
"description": "A service adapter for Sequelize an SQL ORM", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"homepage": "https://github.com/feathersjs/feathers-sequelize", | ||
@@ -83,2 +83,4 @@ "main": "lib/", | ||
"mocha": "^3.0.0", | ||
"pg": "^6.1.5", | ||
"pg-hstore": "^2.3.2", | ||
"rimraf": "^2.5.4", | ||
@@ -85,0 +87,0 @@ "semistandard": "^11.0.0", |
Sorry, the diff of this file is not supported yet
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
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
78337
460
18