Merge branch 'release/1.1.1' into production
This commit is contained in:
commit
0fa0c13533
|
@ -334,13 +334,15 @@ SqlConnector.prototype.count = function count(model, callback, where) {
|
||||||
* @param {Object} data The model data instance containing all properties to be updated
|
* @param {Object} data The model data instance containing all properties to be updated
|
||||||
* @param {Function} cb The callback function
|
* @param {Function} cb The callback function
|
||||||
*/
|
*/
|
||||||
SqlConnector.prototype.updateAttributes = function updateAttrs(model, id, data, cb) {
|
SqlConnector.prototype.updateAttributes = function updateAttributes(model, id, data, cb) {
|
||||||
if (!isIdValuePresent(id, cb)) {
|
if (!isIdValuePresent(id, cb)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var idName = this.getDataSource(model).idName(model);
|
var idName = this.getDataSource(model).idName(model);
|
||||||
data[idName] = id;
|
delete data[idName];
|
||||||
this.save(model, data, cb);
|
var where = {};
|
||||||
|
where[idName] = id;
|
||||||
|
this.updateAll(model, where, data, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "loopback-connector",
|
"name": "loopback-connector",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Building blocks for LoopBack connectors",
|
"description": "Building blocks for LoopBack connectors",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"StrongLoop",
|
"StrongLoop",
|
||||||
|
|
Loading…
Reference in New Issue