title: How to get the first entity from linked entity
body: <p>I have the </p>
  
  <pre><code>Class User  {
  
  @OneToMany
      private $profiles
  }
  </code></pre>
  
  <p>Now I have the $user entity in my controller but I also want the first or last profile based on date. How can I achieve this?</p>
  
  <p>I have the method <code>getProfiles()</code> but I think that will return the array collection.</p>