From c79692bc57d1b0fad942bef1b0d36dca5ac5bc08 Mon Sep 17 00:00:00 2001 From: mradko Date: Wed, 27 Sep 2017 14:35:27 +0300 Subject: [PATCH 1/4] remove duplicate declaration of async accessors methods --- lib/Associations/Many.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Associations/Many.js b/lib/Associations/Many.js index adb7b1ff..7bce6eac 100644 --- a/lib/Associations/Many.js +++ b/lib/Associations/Many.js @@ -60,7 +60,7 @@ exports.prepare = function (db, Model, associations) { }) || util.formatField(OtherModel, name, true, opts.reversed), { makeKey: makeKey, required: true } - ) + ); var assocName = opts.name || ucfirst(name); var assocTemplateName = opts.accessor || assocName; @@ -85,12 +85,6 @@ exports.prepare = function (db, Model, associations) { hasAccessor : opts.hasAccessor || ("has" + assocTemplateName), delAccessor : opts.delAccessor || ("remove" + assocTemplateName), addAccessor : opts.addAccessor || ("add" + assocTemplateName), - - getAccessorAsync : opts.getAccessor + promiseFunctionPostfix || ("get" + assocTemplateName + promiseFunctionPostfix), - setAccessorAsync : opts.setAccessor + promiseFunctionPostfix || ("set" + assocTemplateName + promiseFunctionPostfix), - hasAccessorAsync : opts.hasAccessor + promiseFunctionPostfix || ("has" + assocTemplateName + promiseFunctionPostfix), - delAccessorAsync : opts.delAccessor + promiseFunctionPostfix || ("remove" + assocTemplateName + promiseFunctionPostfix), - addAccessorAsync : opts.addAccessor + promiseFunctionPostfix || ("add" + assocTemplateName + promiseFunctionPostfix) }; associations.push(association); From 568236d0ff705068146c72acb5690d2ee4abf45b Mon Sep 17 00:00:00 2001 From: mradko Date: Wed, 27 Sep 2017 14:45:46 +0300 Subject: [PATCH 2/4] 4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dfc98558..21e9a78e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "sqlite", "mongodb" ], - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "homepage": "http://dresende.github.io/node-orm2", "repository": "http://github.com/dresende/node-orm2.git", From ec857ebef16d98fd0eb4a80c9d3a3378954d3bc9 Mon Sep 17 00:00:00 2001 From: mradko Date: Thu, 28 Sep 2017 08:56:45 +0300 Subject: [PATCH 3/4] remove trailing comma --- lib/Associations/Many.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Associations/Many.js b/lib/Associations/Many.js index 7bce6eac..684dbae2 100644 --- a/lib/Associations/Many.js +++ b/lib/Associations/Many.js @@ -84,7 +84,7 @@ exports.prepare = function (db, Model, associations) { setAccessor : opts.setAccessor || ("set" + assocTemplateName), hasAccessor : opts.hasAccessor || ("has" + assocTemplateName), delAccessor : opts.delAccessor || ("remove" + assocTemplateName), - addAccessor : opts.addAccessor || ("add" + assocTemplateName), + addAccessor : opts.addAccessor || ("add" + assocTemplateName) }; associations.push(association); From 58780d939362f5d2ddaf7de940606697dafa4cc6 Mon Sep 17 00:00:00 2001 From: mradko Date: Thu, 28 Sep 2017 09:06:30 +0300 Subject: [PATCH 4/4] update change log --- Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.md b/Changelog.md index 0a3490dc..fb362e12 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +### v4.0.1 +- Fix undefinedAsync accessor methods. + +### v4.0.0 +- Added Promise support (see readme & wiki) ([#807](../../pull/807)) + ### v3.2.4 - Update dependencies