mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-19 14:55:31 +00:00
UBERF-4356 (#4521)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
896ac1172b
commit
94c6f8d158
@ -672,9 +672,19 @@ export class LiveQuery extends TxProcessor implements Client {
|
|||||||
space: tx.objectSpace
|
space: tx.objectSpace
|
||||||
}
|
}
|
||||||
|
|
||||||
TxProcessor.updateDoc2Doc(doc, tx)
|
// we cannot handle $inc correctly, let's skip it
|
||||||
|
const { $inc, ...ops } = tx.operations
|
||||||
|
|
||||||
|
const emptyOps = Object.keys(ops).length === 0
|
||||||
|
let matched = emptyOps
|
||||||
|
if (!emptyOps) {
|
||||||
|
const virtualTx = {
|
||||||
|
...tx,
|
||||||
|
operations: ops
|
||||||
|
}
|
||||||
|
|
||||||
|
TxProcessor.updateDoc2Doc(doc, virtualTx)
|
||||||
|
|
||||||
let matched = false
|
|
||||||
for (const key in q.query) {
|
for (const key in q.query) {
|
||||||
const value = (q.query as any)[key]
|
const value = (q.query as any)[key]
|
||||||
const tkey = checkMixinKey(key, q._class, this.client.getHierarchy())
|
const tkey = checkMixinKey(key, q._class, this.client.getHierarchy())
|
||||||
@ -686,6 +696,7 @@ export class LiveQuery extends TxProcessor implements Client {
|
|||||||
matched = true
|
matched = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (matched) {
|
if (matched) {
|
||||||
const docIdKey = doc._id + JSON.stringify(q.options?.lookup)
|
const docIdKey = doc._id + JSON.stringify(q.options?.lookup)
|
||||||
|
Loading…
Reference in New Issue
Block a user