Comparing version 1.16.1 to 1.16.2
@@ -379,3 +379,8 @@ var Promise = require('bluebird'); | ||
} | ||
innerQuery = innerQuery.getJoin(modelToGet[key], getAll, gotModel).coerceTo("ARRAY")._query | ||
innerQuery = innerQuery.getJoin(modelToGet[key], getAll, gotModel); | ||
if ((modelToGet[key] == null) || (modelToGet[key]._array !== false)) { | ||
innerQuery = innerQuery.coerceTo("ARRAY"); | ||
} | ||
innerQuery = innerQuery._query; | ||
return r.branch( | ||
@@ -406,3 +411,7 @@ doc.hasFields(joins[key].leftKey), | ||
} | ||
innerQuery = innerQuery.coerceTo("ARRAY"); | ||
if ((modelToGet[key] == null) || (modelToGet[key]._array !== false)) { | ||
innerQuery = innerQuery.coerceTo("ARRAY"); | ||
} | ||
return r.branch( | ||
@@ -417,3 +426,3 @@ doc.hasFields(joins[key].leftKey), | ||
return r.table(joins[key].model.getTableName()).getAll(link(joins[key].model.getTableName()+"_"+joins[key].rightKey), {index: joins[key].rightKey}) | ||
}).coerceTo("ARRAY") | ||
}); | ||
@@ -423,2 +432,7 @@ if ((modelToGet[key] != null) && (typeof modelToGet[key]._apply === 'function')) { | ||
} | ||
if ((modelToGet[key] == null) || (modelToGet[key]._array !== false)) { | ||
innerQuery = innerQuery.coerceTo("ARRAY"); | ||
} | ||
return r.branch( | ||
@@ -425,0 +439,0 @@ doc.hasFields(joins[key].leftKey), |
{ | ||
"name": "thinky", | ||
"version": "1.16.1", | ||
"version": "1.16.2", | ||
"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
195437
5264