title: Grails Groovy - Getting min and max date for one to many relationship
body: <p>I have domain classes with one to many relationship between MyClass and Event:</p>
  
  <pre><code>class MyClass {
    String name
    Date firstEvent
    Date lastEvent
    static hasMany = [events : Event]
  }
  
  class Event {
    String name
    Date dateCreated
    static belongsTo = [indicator : Indicator]
  }
  </code></pre>
  
  <p>What is the best way to set firstEvent to reflect the min(dateCreated) and lastEvent to reflect the max(dateCreated) from the associated events?</p>
  
  <p>Perhaps there's a way to access this data in a controller without having it in the domain class?</p>
  
  <p>Appreciate any help. I'm new to grails :)</p>