|
141 | 141 | * no meaning for), and a platform-provisioned column the declared map omits |
142 | 142 | * (`id`, …): the same walk and the same three positions, words per kind. |
143 | 143 | * |
| 144 | + * ## [#20802] …and the nested-relation arm, at `where` only |
| 145 | + * |
| 146 | + * The nested-relation form is SERVED at `where` (`relation-filter-lowering.ts`). |
| 147 | + * There a no-operator object beneath a relation column is not refused by the |
| 148 | + * arm above: it is admitted against the related object's declarations |
| 149 | + * (`admitRelationCondition` — one level, declared keys, a registered related |
| 150 | + * object) or refused in words of its own. The engine then walks the admitted |
| 151 | + * `where` again with this SAME walk ({@link mapRelationConditions}) to collect |
| 152 | + * each condition and, after reading the related object, to replace it — so the |
| 153 | + * door and the lowering find a condition at the same boundaries by |
| 154 | + * construction. The per-aggregation `filter` and `having` keep the refusal. |
| 155 | + * |
144 | 156 | * @see numberComparandDoorVerdict — the pure verdict (lane 1, `@objectstack/spec`). |
145 | 157 | * @see https://github.com/objectstack-ai/objectstack/issues/20336 (the contract) |
146 | 158 | * @see https://github.com/objectstack-ai/objectstack/issues/20351 (this door) |
@@ -386,7 +398,9 @@ function judgeFieldSpec( |
386 | 398 | * [#20546] It carries TWO arms, asked in order at every field key: the |
387 | 399 | * no-operator-object arm (`no-operator-object-door.ts` — a plain object with |
388 | 400 | * no `$` key where a scalar column's value belongs), then the number arm |
389 | | - * ({@link judgeFieldSpec}). One traversal, one set of boundaries (the depth |
| 401 | + * ({@link judgeFieldSpec}). [#20802] At `where` the first arm hands a relation |
| 402 | + * column's object to the nested-relation admission instead, and the lowering |
| 403 | + * pass ({@link WalkContext.lowerOnly}) asks that question alone. One traversal, one set of boundaries (the depth |
390 | 404 | * bound, the combinators descended, the `$` and dotted keys skipped), two |
391 | 405 | * questions — the shape the spec's save-door walk takes for its own arms |
392 | 406 | * (`checkFilterConditionComparands`: "One walk, one set of boundaries, `n` |
|
0 commit comments