mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
AnsiQuoteStrategy does not convert field names to column names for identifiers #7028
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ViktorCollin on GitHub (Aug 29, 2022).
Bug Report
Summary
If a identifier column name for a table differs from the corresponding field name the
AnsiQuoteStrategy::getIdentifierColumnNameswill return the field name that is not usable in SQLCurrent behavior
Given and entity with a primary key column user_id and a field name userId.
The following code results in an
PDOExceptioncaused by SQL query:'DELETE FROM user WHERE userId = ?' with params ["u1"]Expected query would have been:
'DELETE FROM user WHERE user_id = ?' with params ["u1"]How to reproduce
Entity/User.php
test.php
php test.php