Elloo, I have two doctrine objects, and I'm trying to make a left join, but I get the message "Error: class GR \ Entity \ AccountEvents does not have an association with the name Accounts". I looked at other solutions in stackoverflow, but none of them helped.
here is my code
<?php namespace GR\Entity; class Accounts { private $id; private $name; private $email; private $password; private $created_at; private $accountevents; public function __get($property) { return $this->$property; } public function __set($property,$value) { $this->$property = $value; } }
.. and
<?php namespace GR\Entity; class AccountEvents { private $id; private $accounts; private $event; private $created_at; public function __get($property) { return $this->$property; } public function __set($property,$value) { $this->$property = $value; } }
.. and my request
$query = $this->em->createQueryBuilder() ->select('a, e') ->from('GR\Entity\AccountEvents', 'e') ->leftJoin('e.Accounts', 'a') ->query(); $results = $query->getResult();
Thanks in advance
source share