Support for nested .select() calls (#2737)
* Reproduction for #1567 * Recursive handling of nested pointer keys in select * Better support for multi-level nested keys * Adds support for selecting columns natively (mongo) * Support for postgres column selections * Filter-out empty keys for pg
This commit is contained in:
@@ -711,6 +711,7 @@ DatabaseController.prototype.find = function(className, query, {
|
||||
acl,
|
||||
sort = {},
|
||||
count,
|
||||
keys
|
||||
} = {}) {
|
||||
let isMaster = acl === undefined;
|
||||
let aclGroup = acl || [];
|
||||
@@ -779,7 +780,7 @@ DatabaseController.prototype.find = function(className, query, {
|
||||
if (!classExists) {
|
||||
return [];
|
||||
} else {
|
||||
return this.adapter.find(className, schema, query, { skip, limit, sort })
|
||||
return this.adapter.find(className, schema, query, { skip, limit, sort, keys })
|
||||
.then(objects => objects.map(object => {
|
||||
object = untransformObjectACL(object);
|
||||
return filterSensitiveData(isMaster, aclGroup, className, object)
|
||||
|
||||
Reference in New Issue
Block a user