michael wrote:
just do
Code:
select item from testing.Item as item where item.category.name=? order by item.name
There is no need to explicitly join for to-one relations. Also enable SQL logging and look at the generated SQL if you encounter problems, it often helps.
Wonderful! A virtually instantaneous helpful and correct answer! It works now. Is there anywhere other than the reference that this business of to-one relationship and joins is documented, do you know? I'd like to understand things a bit better.
Also, from my description of the requirements, have I got my 'lazy' settings right? I should have mentioned that I do NOT want the deletion of a category to result in the deletion of items in that category (it should ideally go to null).