mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Querying abstract class in the middle of a hierarchy returns NULL instead of objects #5879
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 @BenMorel on GitHub (Feb 12, 2018).
Originally assigned to: @lcobucci on GitHub.
I have the following entity hierarchy:
Abstract classes are in parentheses.
When querying entities of class
A,B,DorE, everything works fine.When querying entities of class
Chowever, Doctrine2.6.0returnsnullinstead of the entity object.I created a test case here:
https://github.com/BenMorel/doctrine-abstract-entity-bug
The script creates 3 concrete entities of classes
B,DandE, then queries every class of the hierarchy.Doctrine
2.5.14returns the correct result:Doctrine
2.6.0, however, fails here:As you can see, querying entities of class
Bug\CreturnsNULLandNULL, instead ofBug\DandBug\Eas expected.@BenMorel commented on GitHub (Feb 12, 2018):
Might be related to #6988, #6937, #7050.
@IljaN commented on GitHub (Feb 17, 2018):
Also seeing same issue with inheritance type joined
@lcobucci commented on GitHub (Feb 18, 2018):
@BenMorel can you please check if #6988 fixes it?
@BenMorel commented on GitHub (Feb 19, 2018):
@lcobucci It works with #6988 ! 👍
@Ocramius commented on GitHub (Feb 19, 2018):
Handled in #6988