title: How can I sort related entities in Ebean?
body: <p>I am using Play Framework and Ebean ORM. Say, I have 2 related entity classes (Card.java and FinalMark.java)</p>
  
  <p>Card.java</p>
  
  <pre><code>@Entity
  public class Card extends Model {
  
    private static final long serialVersionUID = 1L;
    @Id
    . . .
    @OneToMany(mappedBy = "card")
    public List&lt;FinalMark&gt; finalMarks;
    . . .
    public static Finder&lt;Integer, Card&gt; find =
      new Finder&lt;&gt;(Integer.class, Card.class);
  
  }
  </code></pre>
  
  <p>FinalMark.java</p>
  
  <pre><code>@Entity
  public class FinalMark extends Model {
  
    private static final long serialVersionUID = 1L;
    @Id
    @ManyToOne
    public Card card;
    . . .
    public static Finder&lt;Integer, FinalMark&gt; find = new Finder&lt;&gt;(Integer.class,
      FinalMark.class);
  }
  </code></pre>
  
  <p>When I fetching <code>Card</code> instance (by Card.find.byId() for example), All related <code>FinalMark</code> instances also will be fetched. But how can I sort them? Is it possible by Ebean or I should sort resulting list?</p>
  
  <p>Thank you for wasting your time.</p>