Hi, I have a fairly straight forward inheritance hierarchy that I am try to query. The essentials are as follows:
A Car has OneToMany CarPart. CarPart canBe an EnginePart or a BobyPart. A Car has a *brand*. An EnginePart has an *engineNumber*. A BodyPart has a *panelNumber*. 'canBe' is intended to express inverse of an isA relationship. i.e. EnginePart and BodyPart inherit from CarPart I am trying to find all Cars with their *brand *LIKE a *:query *OR if they have an EnginePart with an *engineNumber *LIKE a *:query*. Through the query builder API, I have created the following DQL statement: SELECT c FROM Car c LEFT JOIN e.carParts p WITH TYPE(p) = EnginePart WHERE LOWER(c.brand) LIKE :query OR LOWER(p.engineNumber) LIKE :query When I try to execute this query, I get the following error: [Semantical Error] line 0, col 113 near 'engineNumber) LIKE ': Error: Class CarPart has no field or association named engineNumber This seems like a bug in the semantics validator not recognising the type guard. Please any comments are welcomed -- 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.
