These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: simple HQL question
PostPosted: Mon Apr 28, 2008 11:47 am 
Beginner
Beginner

Joined: Thu Nov 02, 2006 5:11 pm
Posts: 32
Location: Toronto
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.