[DDC-1377] Doctrine doesn't understand associations from SINGLE_TABLE inheritances Created: 14/Sep/11  Updated: 15/Sep/11  Resolved: 15/Sep/11

Status: Closed
Project: Doctrine 2 - ORM
Component/s: DQL, Mapping Drivers, ORM
Affects Version/s: 2.1.1
Fix Version/s: None
Security Level: All

Type: Bug Priority: Blocker
Reporter: Marcos Augusto da Silva Garcia Assignee: Guilherme Blanco
Resolution: Duplicate Votes: 0
Labels: None

Xubuntu 11.04 Linux 2.6.38 i386

Issue Links:
duplicates DDC-16 DQL Ignores properties of subclasses Closed


Doctrine doesn't understand when a query is built from an association to a SINGLE_TABLE parent to get its successors relations.

For example:
Many Lice reside in an Animal (Louse @ManyToOne Animal)
Animals can specialize into Cats or Dogs (SINGLE_TABLE Inheritance)
A Dog can have one Bone (Dog @OneToOne Bone)
A Cat can have one Yarn (Yarn @OneToOne Yarn)

From a specific Louse, Doctrine can't get the Animal's Bone or Yarn.

Comment by Benjamin Eberlei [ 14/Sep/11 ]

Doctrine implements strict OO inheritance, what you want does not work as no casting is currently possible.

Comment by Guilherme Blanco [ 15/Sep/11 ]


Comment by Guilherme Blanco [ 15/Sep/11 ]

Duplicate to DDC-16

Generated at Wed Nov 25 19:34:11 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.