Skip to content

Match column-prefix specifiers case-insensitively in PrestyledAssoc#34

Merged
alganet merged 1 commit into
Respect:masterfrom
alganet:style-realname-boundary
Jun 27, 2026
Merged

Match column-prefix specifiers case-insensitively in PrestyledAssoc#34
alganet merged 1 commit into
Respect:masterfrom
alganet:style-realname-boundary

Conversation

@alganet

@alganet alganet commented Jun 27, 2026

Copy link
Copy Markdown
Member

With PHP-conventional camelCase scope names, the column specifier (e.g. postCategory) is emitted as an unquoted SQL alias. PostgreSQL folds unquoted identifiers to lower case, so the row comes back prefixed postcategory__, while the scope map was keyed by the camelCase name — raising "Unknown column prefix". Snake_case names never tripped this because they were already lower case.

Key the scope map and group the row by the lowercased prefix, so a specifier round-trips regardless of how the driver folds identifier case (PostgreSQL lowercases, MySQL/SQLite preserve). Property names are unaffected — they were already lower case in practice and resolve through the entity factory.

With PHP-conventional camelCase scope names, the column specifier (e.g.
`postCategory`) is emitted as an unquoted SQL alias. PostgreSQL folds unquoted
identifiers to lower case, so the row comes back prefixed `postcategory__`,
while the scope map was keyed by the camelCase name — raising "Unknown column
prefix". Snake_case names never tripped this because they were already lower
case.

Key the scope map and group the row by the lowercased prefix, so a specifier
round-trips regardless of how the driver folds identifier case (PostgreSQL
lowercases, MySQL/SQLite preserve). Property names are unaffected — they were
already lower case in practice and resolve through the entity factory.
@alganet alganet merged commit a58b173 into Respect:master Jun 27, 2026
3 checks passed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.48%. Comparing base (9148d5b) to head (c004a91).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #34   +/-   ##
=========================================
  Coverage     98.48%   98.48%           
  Complexity      194      194           
=========================================
  Files            10       10           
  Lines           397      397           
=========================================
  Hits            391      391           
  Misses            6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants