title: HQL: illegal attempt to dereference collection
body: <p>The situation is like this:</p>
  
  <p>I have an entity Book that holds a one-to-many relationship with Chapter.</p>
  
  <p>Now if I try the query, "<code>from Book book inner join book.chapters chapter where chapter.title like '%hibernate%'</code>", it gives me the desired result.</p>
  
  <p>But if I try, "<code>from Book where book.chapters.title like '%hibernate%'</code>", I get the error <strong>illegal attempt to dereference collection</strong>.</p>
  
  <p>The thing is that I only want the collection of Book objects in return and not a collection of pair of Book and Chapter objects in return which I get with the former query.</p>
  
  <p>Could someone help me understand?</p>