publicationRepository.findAll(
(root, query, criteriaBuilder) -> {
Root<Book> = criteriaBuilder.treat(root, Book.class);
Join<Book, AuthorParticipation> joinAuthors = asBook.join("participations");
return criteriaBuilder.equal(
joinAuthors
.get("author")
.get("name"),
"John Doe");
});