mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Combination of Joined and Single Table Inheritance Hierachy #7509
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 @KevinHansen23 on GitHub (May 26, 2025).
Bug Report
Summary
We have a combination of a parent class
Documentwhich is connected to the classDocumentInputvia a joined table relationship. TheDocumentInputclass uses a single table inheritance and is extended by theDocumentInputOrderClass.Here ist the relevant Configuration:
Current behavior
Using the findBy function leads directly to a Column not found error, where the missing column refers to the table from the
Documentsclass:If we use the QueryBuilder and join manually to Documents we get a result, but it seems impossible to retrieve an object of type DocumentInputOrder. Only objects of type DocumentInput are returned:
If we select from the
Document::classand set anINSTANCE OFwhere Condition with theDocumentInputOrder::classthe result set is empty.Expected behavior
The
findBy()method should not cause an Exception and the QueryBuilder should return Objects of the specified Type.