From dfe1ea1655e7f903df89906385427df6767256a1 Mon Sep 17 00:00:00 2001 From: Aurelien Chivot Date: Wed, 26 Feb 2014 21:10:15 +0100 Subject: [PATCH 1/2] Fix, model builder setter will not try to cast value if already the proper type --- lib/model-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model-builder.js b/lib/model-builder.js index a5076488..8b86e508 100644 --- a/lib/model-builder.js +++ b/lib/model-builder.js @@ -380,7 +380,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett } else { // Assume the type constructor handles Constructor() call // If not, we should call new DataType(value).valueOf(); - this.__data[propertyName] = DataType(value); + this.__data[propertyName] = (value instanceof DataType) ? value : DataType(value); } } } From 5a3eebbc9f7e994b60b115fb6fbff6bb6b6853f3 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 27 Feb 2014 11:13:12 -0800 Subject: [PATCH 2/2] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d725ab8..06f35ecf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopback-datasource-juggler", - "version": "1.3.4", + "version": "1.3.5", "description": "LoopBack DataSoure Juggler", "keywords": [ "StrongLoop",