Closed
Description
I have the following entity hierarchy:
- (A)
- B
- (C)
- D
- E
Abstract classes are in parentheses.
When querying entities of class A
, B
, D
or E
, everything works fine.
When querying entities of class C
however, Doctrine 2.6.0
returns null
instead 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
, D
and E
, then queries every class of the hierarchy.
Doctrine 2.5.14
returns the correct result:
Bug\A:
Bug\E
Bug\D
Bug\B
Bug\B:
Bug\B
Bug\C:
Bug\E
Bug\D
Bug\D:
Bug\D
Bug\E:
Bug\E
Doctrine 2.6.0
, however, fails here:
Bug\A:
Bug\E
Bug\D
Bug\B
Bug\B:
Bug\B
Bug\C:
NULL <!>
NULL <!>
Bug\D:
Bug\D
Bug\E:
Bug\E
As you can see, querying entities of class Bug\C
returns NULL
and NULL
, instead of Bug\D
and Bug\E
as expected.