Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-05-06 13:48:02 +06:00 committed by GitHub
parent a58d0d9374
commit 11fadf935d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -57,12 +57,12 @@ export abstract class MemDb extends TxProcessor {
const result: T[] = []
if (typeof query._id === 'string') {
const obj = this.objectById.get(query._id) as T
if (obj !== undefined) result.push(obj)
if (obj !== undefined && this.hierarchy.isDerived(obj._class, _class)) result.push(obj)
} else if (query._id?.$in !== undefined) {
const ids = query._id.$in
for (const id of ids) {
const obj = this.objectById.get(id) as T
if (obj !== undefined) result.push(obj)
if (obj !== undefined && this.hierarchy.isDerived(obj._class, _class)) result.push(obj)
}
}
return result

View File

@ -56,7 +56,7 @@
{ attachTo },
{
lookup: {
descriptor: core.class.Class
descriptor: view.class.ViewletDescriptor
}
}
)