title: Syntax Error - line 0, col 50: Error: Expected end of string, got '.'"
body: <p>Hi I'm using symfony 4 and doctrine. This is my doctrine query.</p>
  
  <pre><code>public function paginationQueryByAttributes($attributes) {
  
          $qb = $this-&gt;createQueryBuilder("c");
          $qb-&gt;select('c');
  
          if (array_key_exists('model_id', $attributes)) {
              $qb-&gt;leftJoin('c.model', 'm.id');
              $qb-&gt;andWhere('m.id = ' . $attributes['model_id']);
              unset($attributes['model_id']);
          } elseif (array_key_exists('brand_id', $attributes)) {
              $qb-&gt;leftJoin('c.model', 'm');
          }
  }
  </code></pre>
  
  <p>This is my car model.</p>
  
  <pre><code>&lt;?php
  
  namespace App\Entity;
  
  use App\Model\BaseCar;
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  use Symfony\Component\Validator\Constraints as Assert;
  use Swagger\Annotations as SWG;
  use JMS\Serializer\Annotation\Groups;
  
  /**
   * @ORM\Entity(repositoryClass="App\Repository\CarRepository")
   * @UniqueEntity("id")
   */
  class Car extends BaseCar
  {
      /**
       * @ORM\ManyToOne(targetEntity="App\Entity\Model",cascade={"refresh","merge"}, inversedBy="cars")
       * @ORM\JoinColumn(nullable=false)
       */
      protected $model;
  
      public function getModel()
      {
          return $this-&gt;model;
      }
  
      public /**
   * @param $
   */function setModel( $model)
      {
          $this-&gt;model = $model;
  
          return $this;
      }
  }
  </code></pre>
  
  <p>I call repository like this,</p>
  
  <pre><code>$attributes = $request-&gt;request-&gt;all();
  
          $query = $this-&gt;getDoctrine()
                  -&gt;getRepository(Car::class)
                  -&gt;paginationQueryByAttributes($attributes);
  </code></pre>
  
  <p>I'm getting this error.</p>
  
  <blockquote>
    <p>[Syntax Error] line 0, col 50: Error: Expected end of string, got '.'</p>
  </blockquote>
  
  <p>this is the query...</p>
  
  <pre><code> SELECT c 
   FROM App\Entity\Car c 
     LEFT JOIN c.model m.id 
     LEFT JOIN m.brand b 
   WHERE m.id = 2 
     AND b.id = 1 
     AND c.code like :code 
     AND c.name like :name
  </code></pre>