title: HQL Command to Get List of Entity of Another Entity
body: <p>I am 100% sure I did not fully explain my question in the title. My English wasn't enough to explain.</p>
  <p>I have 2 Entities. <code>User</code> and <code>Book</code>. User has a list named <code>readBooks</code>. I want to reach the books in that list using HQL.</p>
  <pre class="lang-java prettyprint-override"><code>@Entity
  public class Book {
   ... (nothing about users)
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>@Entity
  public class User extends BaseUser {
      @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH, CascadeType.DETACH})
      private List&lt;Book&gt; readList;
  
      @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH, CascadeType.DETACH})
      private List&lt;Book&gt; favoriteList;
  }
  </code></pre>
  <p>I know I can easily reach the <code>readList</code> with <code>user.getReadList()</code>. However, I need to reach that list using HQL so that I can apply server-side pagination and sorting easily by just adding a <code>Pagable</code> to the function.</p>