to answer myself the query should have been:
select p from Project as p join p.tasks as t where p.id = :projectid
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984328#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...