title: Can not join in a doctrine query
body: <p>So I'm trying to do a join in a query but doctrine is doing its usually and throwing back errors that are as useful as a broken leg.</p>
  
  <p>Can anyone advice on where I am going wrong here. The error message I am getting; debug: [Syntax Error] line 0, col -1: Error: Expected Doctrine\ORM\Query\Lexer::T_IDENTIFIER, got end of string. in file "./vendor/symfony/doctrine-bridge/Messenger/DoctrineTransactionMiddleware.php" on line 64</p>
  
  <p>Assessment entity</p>
  
  <pre><code> /**
   * @var Candidate
   * @ORM\ManyToOne(
   *          targetEntity="App\Domain\Candidate\Candidate",
   *          inversedBy="assessments")
   * @ORM\JoinColumn(nullable=false)
   */
  private $candidate;
  </code></pre>
  
  <p>Candidate entity</p>
  
  <pre><code> /**
   * @var Assessment[]|Collection
   * @ORM\OneToMany(
   *      targetEntity="App\Domain\Assessment\Assessment",
   *      mappedBy="candidate",
   *      cascade={"persist"})
   * @ORM\JoinColumn(nullable=false)
   */
  private $assessments;
  </code></pre>
  
  <p>Doctrine query</p>
  
  <pre><code>$qb = $this-&gt;entityManager-&gt;createQueryBuilder();
  
  $qb-&gt;select('ca')
      -&gt;from(Candidate::class, 'ca')
      -&gt;innerJoin('ca.assessments', 'as');
  </code></pre>