I am stuck trying to construct a JPQL query and was hoping someone with more JPA experience than mine could help. Consider the following two entities:
class Author{
String name
@OneToMany(mappedBy="author")
Set<Book> books
}
class Book{
String title
Boolean inPrint
@ManyToOne
Author author
}
If I want to return a specific Author (by name) and eagerly fetch (ie LEFT JOIN FETCH) the books where the Book.inPrint flag is true, how would I express that in JPQL?