Comparing version 1.15.2 to 1.15.3
@@ -24,3 +24,3 @@ var util = require(__dirname+'/util.js'); | ||
this._schema = schemaUtil.parse(schema, '', this._options); | ||
this._schema = schemaUtil.parse(schema, '', this._options, this); | ||
//console.log(JSON.stringify(this._schema, null, 2)); | ||
@@ -27,0 +27,0 @@ |
@@ -113,3 +113,3 @@ var arrayPrefix = "__array" | ||
function parse(schema, prefix, options) { | ||
function parse(schema, prefix, options, model) { | ||
var result; | ||
@@ -166,2 +166,5 @@ | ||
}) | ||
if (prefix === '') { | ||
result._setModel(model) | ||
} | ||
return result; | ||
@@ -228,2 +231,5 @@ case Array: | ||
}) | ||
if (prefix === '') { | ||
result._setModel(model) | ||
} | ||
return result; | ||
@@ -230,0 +236,0 @@ } |
@@ -650,4 +650,5 @@ var util = require(__dirname+'/util.js'); | ||
util.loopKeys(object, function(object, key) { | ||
if ((this._model === undefined || this._model._joins.hasOwnProperty(key) === false) | ||
if ((self._model === undefined || self._model._joins.hasOwnProperty(key) === false) | ||
&& (self._schema[key] === undefined)) { | ||
console.log(self) | ||
delete object[key]; | ||
@@ -659,3 +660,3 @@ } | ||
util.loopKeys(object, function(object, key) { | ||
if ((this._model === undefined || this._model._joins.hasOwnProperty(key) === false) | ||
if ((self._model === undefined || self._model._joins.hasOwnProperty(key) === false) | ||
&& (self._schema[key] === undefined)) { | ||
@@ -662,0 +663,0 @@ extraField(prefix, key); |
{ | ||
"name": "thinky", | ||
"version": "1.15.2", | ||
"version": "1.15.3", | ||
"description": "RethinkDB ORM for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/thinky.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
178380
4221