title: How to sort a table by its associated records number in another table in CRUD?
body: <p>I have a Tag class which has a list of UserTags. In the admin page I can modify it to show how many UserTag are associated with each Tag, but how can I sort it by the number of UserTags it is associated with in the admin page? Thanks.</p>
  
  <pre><code>@Table(name = "UTS_TAG")
  public class Tag extends GenericModel {
      public Long id;
  
      public String name;
  
      public String description;
  
      @Required
      public Date last_modified = new Date();
  
      @OneToMany(mappedBy = "tag", cascade = CascadeType.ALL)
      public List&lt;UserTag&gt; userTags;
  }
  </code></pre>