|
Hi folks,
I'm stuck and searched quite a long time for a problem that surely isn't that big...
I have two objects: Book and Person. Each Book may have many authors (instances of Person) and each Person may have written many Books. Many-to-Many.
The tables existing in my DB are:
- book
- books_and_authors
- person
Book and Person have a field "ID" which is represented by "FK_BOOK_ID" / "FK_AUTHOR_ID" in books_and_authors.
The Relation works with no problems, but I try to search for a Book by an Author ID.
Simple Question: How do I do that using HQL?
Thanks in advance,
Karsten
|