title: How to use session in domain class in grails
body: <p>I want to store loggedInUser in a table. So i am accessing loggedInUser using session.But i am getting error like no such property session for this class. How to use session in domain?</p>
  
  <pre><code>class GenderAudit {
  
  
      String name
      User doneBy
  
      def GenderAudit(Gender gender,String operation)
      {
          this.name=gender.name
          this.doneBy = session.loggedInUser
  
      }
  }
  </code></pre>