Merge pull request #390 from r3dm/fix/call-idNames
Fix virtual id get function.
This commit is contained in:
commit
2e08d48ad3
|
@ -253,7 +253,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett
|
||||||
if (idProp !== 'id') {
|
if (idProp !== 'id') {
|
||||||
Object.defineProperty(ModelClass.prototype, 'id', {
|
Object.defineProperty(ModelClass.prototype, 'id', {
|
||||||
get: function () {
|
get: function () {
|
||||||
var idProp = ModelClass.definition.idNames[0];
|
var idProp = ModelClass.definition.idNames()[0];
|
||||||
return this.__data[idProp];
|
return this.__data[idProp];
|
||||||
},
|
},
|
||||||
configurable: true,
|
configurable: true,
|
||||||
|
|
Loading…
Reference in New Issue