Merge pull request #8 from strongloop/fix/handling-of-dynamic-properties

Fix crash in `id(model, prop)`
This commit is contained in:
Miroslav Bajtoš 2015-01-28 19:56:09 +01:00
commit 2868eaeda2
1 changed files with 1 additions and 4 deletions

View File

@ -104,10 +104,7 @@ Connector.prototype.idNames = function (model) {
*/ */
Connector.prototype.id = function (model, prop) { Connector.prototype.id = function (model, prop) {
var p = this._models[model].properties[prop]; var p = this._models[model].properties[prop];
if (!p) { return p && p.id;
console.trace('Property not found: ' + model + '.' + prop);
}
return p.id;
}; };
/** /**