feathers-sequelize
Advanced tools
Comparing version 1.4.2 to 1.4.3
# Change Log | ||
## [v1.4.2](https://github.com/feathersjs/feathers-sequelize/tree/v1.4.2) (2017-03-14) | ||
[Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v1.4.1...v1.4.2) | ||
**Merged pull requests:** | ||
- Fixed missing where clause [\#92](https://github.com/feathersjs/feathers-sequelize/pull/92) ([eikaramba](https://github.com/eikaramba)) | ||
## [v1.4.1](https://github.com/feathersjs/feathers-sequelize/tree/v1.4.1) (2017-03-10) | ||
@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v1.4.0...v1.4.1) |
@@ -188,7 +188,2 @@ 'use strict'; | ||
// By default we will just query for the one id. For multi patch | ||
// we create a list of the ids of all items that will be changed | ||
// to re-query them after the update | ||
var ids = id === null ? this._find(params).then(mapIds) : Promise.resolve([id]); | ||
if (id !== null) { | ||
@@ -200,2 +195,15 @@ where[this.id] = id; | ||
// This is the best way to implement patch in sql, the other dialects 'should' use a transaction. | ||
if (this.Model.sequelize.options.dialect === 'postgres') { | ||
options.returning = true; | ||
return this.Model.update((0, _lodash2.default)(data, this.id), options).then(function (results) { | ||
return results[1]; | ||
}).then((0, _feathersCommons.select)(params, this.id)).catch(utils.errorHandler); | ||
} | ||
// By default we will just query for the one id. For multi patch | ||
// we create a list of the ids of all items that will be changed | ||
// to re-query them after the update | ||
var ids = id === null ? this._find(params).then(mapIds) : Promise.resolve([id]); | ||
return ids.then(function (idList) { | ||
@@ -202,0 +210,0 @@ // Create a new query that re-queries all ids that |
{ | ||
"name": "feathers-sequelize", | ||
"description": "A service adapter for Sequelize an SQL ORM", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"homepage": "https://github.com/feathersjs/feathers-sequelize", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
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
48726
323