You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(#1470): two-hop ref display resolution (display_field that is itself a ref)
build_display_join_plan resolved one hop only — when a target's display_field
is itself a to-one ref, the FK display column projected the nested ref's raw
UUID. Now chains a second LEFT JOIN to the nested target's display_field so
{rel}__display carries the two-hop human name. One-hop unchanged; degrades to
the prior column when the nested target lacks a display_field. Closes the
two-hop "harder related case" from #1471. Plan-string unit tests assert the
exact chained SQL; full -m "not e2e" suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
## [Unreleased]
11
11
12
+
## [0.86.22] - 2026-06-25
13
+
14
+
### Fixed
15
+
- **#1470/#1471 two-hop: ref columns whose target `display_field` is itself a ref now resolve to a human string, not the nested FK's UUID.** `build_display_join_plan` resolved one hop only — when an entity's `display_field` points at another ref (e.g. `Manuscript.display_field: student → User`), the FK display column projected the nested ref's raw UUID. It now detects that case and chains a second `LEFT JOIN` to the nested target's `display_field`, so the `{rel}__display` column carries the two-hop name. One-hop (scalar `display_field`) behaviour is unchanged; degrades to the prior column when the nested target has no `display_field`. This closes the "harder related case" noted on #1471. (Follow-on: a PG fixture exercising the chained join at runtime — currently the join SQL is asserted at the generation level + composes via the proven one-hop path.)
0 commit comments