Skip to content

Commit ef03ae6

Browse files
committed
test(objectql): the inspect-cascade double answers $in, which the collection now sends per depth
Claude-Session: https://claude.ai/code/session_01FEkQ5ktxGoJfsedLmkFjdk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1554220 commit ef03ae6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/objectql/src/engine-inspect-cascade-delete.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ function makeDriver() {
3333
if (!where || typeof where !== 'object') return true;
3434
for (const [k, v] of Object.entries(where as Row)) {
3535
if (k.startsWith('$')) continue;
36+
// [#27004] The collection probes the records of one depth together.
37+
if (v && typeof v === 'object' && Array.isArray((v as Row).$in)) {
38+
if (!((v as Row).$in as unknown[]).some((x) => String(x) === String(row[k]))) return false;
39+
continue;
40+
}
3641
const exp = v && typeof v === 'object' && '$eq' in (v as Row) ? (v as Row).$eq : v;
3742
if ((row[k] ?? null) !== (exp ?? null)) return false;
3843
}

0 commit comments

Comments
 (0)