Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 2.0-ALPHA2
-
Fix Version/s: None
-
Component/s: DQL
-
Security Level: All
-
Labels:None
Description
I have a classes B and C which inherit from superclass A. I would like
to get a list of all A's but filter the list to ignore those in C
which have a property d set to 2.
select a from A where a.d == 2 fails because "d" is not a property of A.
Issue Links
- is duplicated by
-
DDC-1377
Doctrine doesn't understand associations from SINGLE_TABLE inheritances
-
Thats indeed tricky. That syntax alone can, however, never work, because there might be several subclasses that have a field named "d", so Doctrine would not know which field you mean.
We might need special syntax for such constructs but I'm not sure it is worth it. If anyone has an idea, just shoot.
Alternatively, apart from using a native query, what about this DQL: