Skip to content

Test explicit column mappings with name collisions - #337

Open
elpete wants to merge 1 commit into
nextfrom
test/59-explicit-column-collision
Open

Test explicit column mappings with name collisions#337
elpete wants to merge 1 commit into
nextfrom
test/59-explicit-column-collision

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #59

Issue review

Recommendation: 9/10 — preserve and test. An explicit column mapping must always win over an identically named physical column; otherwise an entity silently hydrates incorrect data. The regression is small and protects a fundamental mapping guarantee.

Reproduction note

The bug could not be reproduced on current next with qb@14.0.0-beta.3. The fixture maps a username property to first_name on a table that also has a real username column. Quick returns Eric from first_name, stores only the mapped first_name value internally, and does not hydrate the conflicting username column.

Implementation

  • adds a focused entity fixture matching the issue’s collision shape
  • verifies behavior through findOrFail and the generated public getter
  • verifies the internal hydrated column is the explicit mapping

Validation

  • focused AttributeSpec: 17 passed, 0 failed, 0 errors
  • full Lucee 6 suite: 496 passed, 0 failed, 0 errors, 3 skipped
  • box run-script format
  • git diff --check

Uses qb@14.0.0-beta.3.

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