Have you declared load-groups and set eager-loading and lazy loading groups for your columns? Have a look at the CMP doc for details.
No, I haven't done that. I wouldn't expect it to change the table-join that JBoss is generating, but it's certainly worth checking.
In case anyone else is interested I'll post the answer which I eventually came up with myself.
Instead of using a finder on Book looking something like this:
bookHome.findByAuthorPk( authorPk );
use a finder on the Author and then ask for his books, something like this:
authorHome.findByPrimaryKey( authorPk ).getBooks();
or, possibly better yet (because it is more flexible) change the book finder to take an Author rather than a primary key, like this:
Author author =
authorHome.findByPrimaryKey( authorPk );
bookHome.findByAuthor( author );
Both of these solutions perform an Author lookup which might be considered unnecessary, but this is better than a table join.