Skip to content

fix(refresh): hydrate projected rows with aliased primary keys - #366

Merged
elpete merged 4 commits into
mainfrom
fix/projected-refresh-aliased-keys
Oct 15, 2026
Merged

elpete merged 4 commits into
mainfrom
fix/projected-refresh-aliased-keys

Conversation

@elpete

@elpete elpete commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Refreshing a projected entity fails with MissingHydrationKey when its primary-key attribute maps to a differently named database column. The saved query returns database column names, while hydrate() validates attribute aliases.

Load the returned row through the same attribute/original-attribute/loaded lifecycle used by normal query hydration. Preserve the shared projection snapshot and the existing public hydrate() key validation. Add an integration regression covering the aliased key, virtual projection, repeated fresh reads, clean persisted attributes and loaded state, and unchanged original entity.

Validation: the local Lucee 6 snapshot suite passed all 9 tests. Against released Quick 13.0.5, the same aliased-key test fails with MissingHydrationKey. Cross-engine CI is running on the updated branch.

@elpete
elpete merged commit 4c05182 into main Oct 15, 2026
27 of 53 checks passed
@elpete
elpete deleted the fix/projected-refresh-aliased-keys branch October 15, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant