title: Is this a valid use of Grails transients?
body: <p>I have a domain object on which I want to store a few things which only exist at runtime.  I looked at the <a href="http://grails.org/doc/latest/ref/Domain%20Classes/transients.html" rel="nofollow noreferrer">documentation</a> and found the <code>transients</code> keyword, which, on the face of it was what I was looking for.  Here is what my domain object looks like...</p>
  
  <pre><code>class Contact {
  
      def Seeker
  
      def beforeInsert() 
      {
         initiatedDate = new Date()
      }
  
      Date initiatedDate
      Date acceptedDate
  
      static transients = ['pal']
      Seeker pal
  }
  </code></pre>
  
  <p>where <code>Seeker</code> is a groovy class which is not a domain object, but a placeholder for some properties.</p>
  
  <p>So far all is fine and my Contact table does not have a <code>pal</code> field as expected.  In my <code>ContactController</code> I query for a bunch of contacts, <code>c</code>, then look up their <code>Seeker</code> pals (details of how withheld) and set the <code>pal</code> field to a new object.</p>
  
  <pre><code>c.pal = new Seeker();
  c.pal.name = otherObject.name
  render c as JSON
  </code></pre>
  
  <p>This all seems to work fine except that the pal object is missing from the JSON returned.</p>
  
  <p>Is this a valid use of transients?  The docs mention that they are handy for function-based getters and setters, but in my case I want an actual object.  Should I be writing a getPal() and setPal() method on my object?</p>
  
  <p>Thanks</p>