> > select from BOOK,AUTHOR,BOOK B where
> > BOOK.AUTHOR_ID=AUTHOR.AUTHOR_ID AND
> > B.SECOND_AUTHOR_ID=AUTHOR.AUTHOR_ID
>
> Should the query look like this?
>
> SELECT FROM book, author a1, author a2 WHERE
>book.author_id = a1.id AND
>book.second_author_id = a2.id
>
> Pls correct me if
Should the query look like this?
SELECT FROM book, author a1, author a2 WHERE
book.author_id = a1.id AND
book.second_author_id = a2.id
Pls correct me if I am wrong.
I think you can achieve this with Criterion??? But hell, I am not shure...
don't have much of experience with T
Hi,
I wonder how I should best create a multiple join between two tables.
Consider the following example:
There are two tables, AUTHOR and BOOK. Assuming that each book has two
authors, the BOOK table has two references on the AUTHOR table by two
foreign keys, AUTHOR_ID and SECOND_AUTHOR_ID.