From f58d3c82e36f9c73b6df08ed098668dfdfec4316 Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Mon, 29 Dec 2014 08:27:46 -0800 Subject: [PATCH 1/4] Fix bad CLA URL in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4bcfc2..fc953a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Contributing to `loopback-connector` is easy. In a few simple steps: * Adhere to code style outlined in the [Google C++ Style Guide][] and [Google Javascript Style Guide][]. - * Sign the [Contributor License Agreement](https://cla.strongloop.com/strongloop/loopback-connector) + * Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-connector) * Submit a pull request through Github. From 1eb6d79b978f67e96452d3b514977bcb34e18e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Wed, 28 Jan 2015 11:38:11 +0100 Subject: [PATCH 2/4] Fix crash in `id(model, property)` Before this change, an attempt to save a model instance with a dynamic property to a MySQL datasource crashed the application. This commit fixes the implementation of `id(model, property)` to correctly handle the case when the property is not described in the model definition. --- lib/connector.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/connector.js b/lib/connector.js index 54d4227..3eb6c79 100644 --- a/lib/connector.js +++ b/lib/connector.js @@ -104,10 +104,7 @@ Connector.prototype.idNames = function (model) { */ Connector.prototype.id = function (model, prop) { var p = this._models[model].properties[prop]; - if (!p) { - console.trace('Property not found: ' + model + '.' + prop); - } - return p.id; + return p && p.id; }; /** From e9b3e2d55cd7499cf829d4db9b535f34ae430ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Wed, 28 Jan 2015 19:57:37 +0100 Subject: [PATCH 3/4] package: add jshint to devDependencies --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8b9ab81..ac362b5 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ }, "devDependencies": { "chai": "~1.9.2", + "jshint": "^2.6.0", "loopback-datasource-juggler": "^2.0.0", "mocha": "^1.19.0" } From d519a360d8dd1998bc06e2b2ac554af161eeaaf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Wed, 28 Jan 2015 19:57:57 +0100 Subject: [PATCH 4/4] v1.2.1 --- CHANGES.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..677fdce --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,46 @@ +2015-01-28, Version 1.2.1 +========================= + + * package: add jshint to devDependencies (Miroslav Bajtoš) + + * Fix crash in `id(model, property)` (Miroslav Bajtoš) + + * Fix bad CLA URL in CONTRIBUTING.md (Ryan Graham) + + +2014-10-13, Version 1.2.0 +========================= + + * Bump version (Raymond Feng) + + * Make sure callback happens if a model is not attached to the data source (Raymond Feng) + + * Update contribution guidelines (Ryan Graham) + + +2014-07-20, Version 1.1.1 +========================= + + * Bump version (Raymond Feng) + + * Fix updateAttributes impl (Raymond Feng) + + +2014-06-20, Version 1.1.0 +========================= + + * Bump version (Raymond Feng) + + * Fix style to pass jlint (Raymond Feng) + + * Add space (Raymond Feng) + + * Add bulk update support (Raymond Feng) + + * Fix the count() impl to use buildWhere() from the subclass (Raymond Feng) + + +2014-06-03, Version 1.0.0 +========================= + + * First release! diff --git a/package.json b/package.json index ac362b5..ed1d851 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-connector", - "version": "1.2.0", + "version": "1.2.1", "description": "Building blocks for LoopBack connectors", "keywords": [ "StrongLoop",