Commit 6443b79
`assertSortFieldsExist` refuses a dotted `orderBy` and then told the author how
to fix it: "Denormalise the value onto '<object>' (a formula or rollup field
that copies it into a real column) and sort by that." Following that lands the
author back inside the exact silent degradation the refusal saved them from.
Measured on a REAL SqlDriver (better-sqlite3) and on InMemoryDriver, with a
`formula` field named directly in `orderBy` (non-dotted, so the gate lets it
through):
control orderBy title asc -> A B C D E a real column really sorts
baseline no sort -> C A E B D insertion order
orderBy <formula> asc -> C A E B D 200 insertion order
orderBy <formula> desc -> C A E B D 200 direction-blind
`SqlDriver.createColumn` returns early for `formula` (no column), sqlite answers
"no such column", the #3821 backstop retries WITHOUT the sort, and the response
is 200 with every row present in arbitrary order.
`rollup`/`summary` is dropped for a DIFFERENT reason, and the measurement
contradicts the reported diagnosis: a summary field does get a real, maintained
column (orderBy <summary> desc -> E D C B A over values 5 4 3 2 1). It simply
cannot do this job, since a rollup aggregates CHILD records and cannot carry a
looked-up parent's column onto the queried object.
This overturns #4256's recorded wording choice (closed `completed`), which
explicitly picked the "formula or rollup" phrasing as its remedy. The docs
callout at content/docs/protocol/objectql/query-syntax.mdx taught the same
denormalization, so code and docs agreed with each other about something untrue;
both move here. "Stored" is #6673's vocabulary for the identical correction on
the search axis.
Claude-Session: https://claude.ai/code/session_01W6bLax4KMrSfnE1ydFU8Dw
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 63f3b87 commit 6443b79
4 files changed
Lines changed: 144 additions & 6 deletions
File tree
- .changeset
- content/docs/protocol/objectql
- packages
- metadata-protocol/src
- objectql/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
540 | 561 | | |
541 | 562 | | |
542 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4819 | 4819 | | |
4820 | 4820 | | |
4821 | 4821 | | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
4822 | 4857 | | |
4823 | 4858 | | |
4824 | 4859 | | |
| |||
4855 | 4890 | | |
4856 | 4891 | | |
4857 | 4892 | | |
4858 | | - | |
4859 | | - | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
4860 | 4897 | | |
4861 | 4898 | | |
4862 | 4899 | | |
| |||
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
456 | 481 | | |
457 | 482 | | |
458 | 483 | | |
| |||
0 commit comments