|
I am trying to write an HQL query that should be simple, but I'm not that comfortable with HQL. Using the Blog and Posts model, let's say that each post has a flag 'IsPublished', and I want to select all blogs for which all posts have been published, and also fetch join the Posts collection, something like
select b
from Blog b
join fetch b.Posts p
where ...
I'm having trouble constructing the where clause, so as to get only Blogs where p.IsPublished = true for *all* posts belonging to that blog.
Any ideas?
Thanks.
|