I did an JPA n:m structure where books(id, name) and authors(id, lastname) has a n:m Relation with a self-made table (bookAuthors) inbetween which has (book.id, authors.id) as combined pk.
Now I want to do a JPQL Querie where all books with more then one author will be returned.
I tried a few SELECTs but none of them worked. So you have an idea how to JPQL-SELECT auch a query?
Thanks in advance Sut
If you configured your entity correctly i presume your entity looks like following:
Book.java
Author.java
Then your
BookRepository.javashould contain a method like followingBookRepository.java