LEFT JOIN with ON - JPA Repository in Spring
<p>I´m working on a Spring Boot App and struggling on a SQL-Query in my repository.
The query should select all IDs from employees which never postet in my Webapp.</p>

<p>In MySQL Workbench following statement ist working propper and I achive the result like expected.</p>

<pre><code>SELECT e.id FROM employees e LEFT JOIN posts p ON p.owner_id = e.id WHERE p.owner_id IS NULL
</code></pre>

<p>But I cant find out how to write it in my PostRepository which extends a JpaRepository from Spring.
This is the error message</p>

<blockquote>
  <p>o.h.hql.internal.ast.ErrorCounter        : Invalid path: 'p.owner_id</p>
</blockquote>

<p>This is the statment I use in my repository.</p>

<pre><code>@Query("SELECT e FROM employees e LEFT JOIN p.posts p ON p.owner_id = e.id WHERE p.owner_id IS NULL")
List&lt;Employee&gt; getEmployeeIdsNeverVoted();
</code></pre>

<p>I don´t know how to use the "ON" and define the path for it.</p>