mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1234: With class table inheritance, SqlWalker always joins subclass tables even when they are not used #1552
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 (Jun 27, 2011).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user pschwisow:
When using class table inheritance, it is not possible to avoid joining subclass tables even if they are not needed. For example, when selecting only scalar fields of the parent class and using array hydration.
Classes:
Test code:
The generated SQL includes 'employee' table even though it is not used.
@doctrinebot commented on GitHub (Jun 28, 2011):
Comment created by @beberlei:
A change that detects this would be considered an improvement, the functionality works, its just not very efficient in this case.
I doubt there is a simple and good way to implement this though, i assign this to Guilherme for evaluation.
@doctrinebot commented on GitHub (Oct 16, 2011):
Comment created by @guilhermeblanco:
That would require almost a complete rewrite of DQL parser to be able to be done.
An alternative would be a 2-step parser, but it would slowdown the performance of DQL => SQL translation so much that I consider it's better to mark as can't fix.
@doctrinebot commented on GitHub (Oct 16, 2011):
Issue was closed with resolution "Can't Fix"