mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1795: Bug in generation sql when using join on extended entity #2258
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 @doctrinebot on GitHub (Apr 24, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user alimovalisher@gmail.com:
I have several entities:
*Client
*Payment
*PaymentDeposit
*PaymentWithdraw
PaymentDeposit and PaymentWithdraw extends from entity Payment
Here is the code
When I try to get result with such query I got sql error
sql error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't2_.client_to' in 'on clause' (uncaught exception) at project/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php line 628
native sql query(generated)
Problem is here
extended Entities PaymentDeposit, PaymentWithdraw (tables) doesnt have field clientFrom & clientTo they extend them from entity Payment
P.S. I removed unnecessary fields from Entities to make code example more clearly