Skip to content

Reject duplicate entity property names - #337

Open
elpete wants to merge 4 commits into
nextfrom
test/59-explicit-column-collision
Open

Reject duplicate entity property names#337
elpete wants to merge 4 commits 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.

Reproduction and follow-up

The original reported behavior cannot be reproduced on current next with qb@14.0.0-beta.3: an explicit username to first_name mapping wins even though the table also has a physical username column.

Lucee does accept two entity properties with the same name and collapses them in component metadata. Quick now detects duplicate local property declarations during its cached metadata inspection and throws QuickDuplicateProperty, avoiding an ambiguous generated accessor and column mapping.

Implementation

  • keeps the explicit-column collision fixture and public getter regression
  • adds a public entity-resolution regression for duplicate property names
  • validates only declarations in the local component source, leaving inherited properties alone
  • supports script and tag property declarations when source is available

Validation

  • focused Lucee 6 AttributeSpec: 19 passed, 0 failed, 0 errors
  • formatting check passed
  • git diff --check passed

Uses qb@14.0.0-beta.3 and targets next.

@elpete
elpete force-pushed the test/59-explicit-column-collision branch from b5c04d2 to eebf9d6 Compare August 24, 2026 21:19
@elpete elpete changed the title Test explicit column mappings with name collisions Reject duplicate entity property names Aug 24, 2026
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