Hi, You are trying to use SQL-ish syntax in DQL.
DQL does not work with column names, but with properties of your objects. The correct query is something like: SELECT u FROM AcmeUserBundle:User u LEFT JOIN u.relBrokers b WHERE u.id = :id Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 27 May 2014 18:51, Nebumix <[email protected]> wrote: > Hi, I have a self referencing relationship on a entity class, using > symfony 2. > > This is my class: http://pastebin.com/HFCYg7qt > > It created a table with the relation, with two primary key and two fields: > broker_id, client_id > > I'm trying to filter a query > > http://pastebin.com/vPC4BVYS > > but I have this error, I can't understand what is the problem. > > [Semantical Error] line 0, col 69 near 'client_id = ': Error: Class > Acme\UserBundle\Entity\User has no field or association named client_id > Thanks for the help > Regards > > -- > 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. > -- 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.
