diff --git a/lib/dao.js b/lib/dao.js index f34ed8b32..4ae1030f2 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -1929,7 +1929,18 @@ DataAccessObject.find = function find(query, options, cb) { delete obj.__data.__cachedRelations; } } - + const keys = Object.keys(data); + keys.forEach(key => { + if ( + key.includes('sumOf') || + key.includes('countOf') || + key.includes('avgOf') || + key.includes('minOf') || + key.includes('maxOf') + ) { + obj.__data[key] = data[key]; + } + }); callback(null, obj); }