title: failed to lazily initialize a collection of role In Grails
body: <p>I got struck here. There is a parent Table like below.</p>
  
  <pre><code>     class Parent{
          static hasMany = [child: Child];
          static Parent findByParent(Parent parent){
          def c = Parent.createCriteria()
          def result = c.get {
          child{
               idEq(parent.id)
          }
         }
        }
       }
  
      class Child {
  
      }
  </code></pre>
  
  <p>Below is controller action.</p>
  
  <pre><code>    def save(Child child){
        def orderList;
        if(parent){
          orderList = parent?.child(); // here i am getting exception. failed to lazily initialize 
                                        //  a collection of role: Parent.child, no session or session  
                                          //was closed. Stacktrace follows:
        }
      }      
  </code></pre>
  
  <p>So how to handle this situation.Or is there any Annotations to Eager initialization.</p>