From 3fac41985bd6ecda7958781496178f54c56a690c Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 12 Jan 2015 08:43:55 -0800 Subject: [PATCH] Fix virtual id get function. --- 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 87eed664..8af0a02d 100644 --- a/lib/model-builder.js +++ b/lib/model-builder.js @@ -253,7 +253,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett if (idProp !== 'id') { Object.defineProperty(ModelClass.prototype, 'id', { get: function () { - var idProp = ModelClass.definition.idNames[0]; + var idProp = ModelClass.definition.idNames()[0]; return this.__data[idProp]; }, configurable: true,