title: delete row in join table with jpa
body: <p>I have a problem and I can not find the solution. I have a Book table and an Author table, with many to many relationship. The Book table is in the book schema, and the Author table in the person schema. So I have this:</p>
  
  <p>book.book</p>
  
  <p>people.author</p>
  
  <p>I made the following code:</p>
  
  <pre><code>*** Entity Book ***
  @ManyToMany(mappedBy = "book")
  private List&lt;Author&gt; author = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>*** Entity Author ***
  @ManyToMany
  @JoinTable(schema = "join_tables", name = "book_author", joinColumns = @JoinColumn(name = "fk_author"), inverseJoinColumns = @JoinColumn(name = "fk_book"))
  private List&lt;Book&gt; books = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>I can register a book with several authors, one author with several books. I can insert an author to a book already registered. Insert a book to an author already registered. But I can not remove the relationship of a book to an author.
  What I tried to do:</p>
  
  <pre><code>@Repository
  public interface AuthorRepository extends JpaRepository&lt;Author, Long&gt; {
  
      @Query("DELETE FROM join_tables.book_author jtba  WHERE  jtba.fk_author = :fka AND jtba.fk_book = :fkb")
      void deleteRelationshipBookAuthor(@Param("fka") Long fka, @Param("fkb") Long fkb);
  }
  
  
  And it always shows the same error:
  org.hibernate.hql.internal.ast.QuerySyntaxException: join_tables.book_author is not mapped
  </code></pre>
  
  <p>But the table exists in the database and has all the data I entered.</p>