On Sunday, 16 March 2014 22:01:07 UTC+1, Parsifal wrote: > > Herman, generally why this should happen? Doesn't it mean that there > should be a mapping mistake that the other way may or may not work? > No, it is not a mapping mistake:
- If you have a relation with a superclass (i.c. CarPart), then you cannot check a property of the subclass (i.c. engineNumber of EnginePart). Because not all subclasses have that property. That is what issue DDC-16 is about. That is a limitation in the way it is buit in Doctrine at the moment and will be solved when there is a "rock-solid implementation" for it. - But if you go the other way around,selecting the property of a subclass (i.c. engineNumber of EnginePart) and then go up to the superclass (i.c. CarPart) and follow its relation to another object (i.c. Car), then it is possible. Class Table inheritance is a kind of one-way traffic: when you want to get the other entities it is related to via the parent, you can only go from the child to the parent, not the other way around. There is some rationale in it:* the children are entities, the parent class is not*. Only the children are instantiated. They are objects, the superclass is not. If you only look at the relations between the entities, there is no CarPart entity, only EnginePart and BodyPart entities with a common superclass CarPart. So, when only looking at the entities, there are two OneToMany relations: fromCar to EnginePart and from Car to BodyPart. Due to the way it is implemented in Doctrine now, those relations are more-or-less unidirectional. -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
