A to-one relation can be labelled, in English and per country - #7676
Open
nedelcho-delchev-tues wants to merge 2 commits into
Open
nedelcho-delchev-tues wants to merge 2 commits into
nedelcho-delchev-tues wants to merge 2 commits into
Conversation
A field could declare `label:` and `countryLabels:` (eclipse-dirigible#6424) but the relation next to it could not, and a relation is named for the model: `Year.company` rendered its picker, its list column and its details row as "Company", with no way to say "Issuing company" in the intent. The only place left to put the English caption was the generated catalog, which the next Generate overwrites. Both keys are now accepted on a to-one relation and on a `subset`, validated by the same rule a field's are (a blank label is refused, a key that is no ISO 3166-1 country is refused because it could never match a tenant), and emitted onto the relation's own FK property as `widgetLabel` / `widgetCountryLabels` - the property every generated surface already reads its label from, so nothing downstream changed. A `oneToMany` renders no control of its own, so a label authored there would be carried nowhere and is refused rather than dropped. An n:m is expanded before validation, so the authored keys travel with the to-target half of the materialized link, where the picker ends up. Fixes eclipse-dirigible#7650 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…on-label # Conflicts: # .claude/docs/intent-dsl-features.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7650
A field could declare
label:andcountryLabels:(#6424), but the relation next to it could not — and a relation carries the model's identifier, so a company'sYear.companyrendered its picker, its list column and its details row as "Company" with no way to say "Issuing company" in the intent. The only place left for the English caption was the generated catalog, which the next Generate overwrites.Both keys are now accepted on a to-one relation and on a
subset. They are validated by exactly the rule a field's are — a blank label is refused, and a key that is no ISO 3166-1 alpha-2 country is refused because it could never match a tenant — and emitted onto the relation's own FK property aswidgetLabel/widgetCountryLabels. That is the property every generated surface already reads its label from and the catalog is seeded from, so nothing downstream needed a change and an unlabelled relation generates byte-identically.A
oneToManyrenders no control of its own (the FK lives on the child), so a label authored there would be carried nowhere. It is refused with a message that points at the construct that does render one, rather than silently dropped.An n:m relation is expanded into its link entity before validation runs, so
ManyToManyExpandermoves the authored keys onto the to-target half of the link — the half the picker is rendered from.Covered by
FieldLabelIntentTest(the relation carries both keys, a collection is refused, a variant is held to the same country rule) andEdmFieldLabelTest(the caption reaches the FK property, an unlabelled relation carries nothing at all). The engine-intent suite is green: 1485 tests.