title: Grails strange properties exception
body: <p>Hope i'm not putting too much code in here  ..  I have what i consider a strange problem  ..  I have  2 classes ..  </p>
  
  <pre><code>class Card {
      String customerNumber
      String memberId
      String cardNumber
      String issueNumber
  
      Boolean active = true
  
      // Audit info ..
      Date dateCreated
      String createdBy
      Integer uniqId
  }
  </code></pre>
  
  
  
  <pre><code>class CardHistory extends Card {
      static constraints = {
          note(nullable: true, size:1..500)
      }
  
      // History note
      String note
  
      // Audit info ..
      Date originalDateCreated
      String originalCreatedBy
      Integer originalUniqId
  
  }
  </code></pre>
  
  <p>and another .. </p>
  
  <pre><code>class Seat {
  ... 
      Card activeCard 
  }
  </code></pre>
  
  <p>I have some code which generates a history record from the current one by doing</p>
  
  <pre><code>cardHistoryInstance.properties = seat.card.properties
  </code></pre>
  
  <p>but it's throwing a <code>NullPointerException</code> .. </p>
  
  <p>So I wrote this to test it ..  </p>
  
  <pre><code>def seat = Seat.get(1)
  
  try{
      def cardHistoryEntry = new CardHistory(); 
      println cardHistoryEntry.properties
      println "properties okay  .." 
  
      assert seat
      println "Seat okay  ..."
  
      assert seat.card
      println "Card okay  ..."
  
      println seat.card.dateCreated
      println "Date okay  ..."
  
      .... and each of the other properties    
  
      println seat.card.customerNumber 
      println "customer number okay .. "
  
      println "Seems okay  .."
  
      println seat.card.properties    &lt;----  Blows up with NPE here ..  
      println "Don't get to here"
  }
  catch(e)
  {
      println  "OOps .. An error occurred ${e} .."
  }
  </code></pre>
  
  <p>So basically I can get at each property individually but accessing via properties keyword is giving me a npe  ..  Can anyone shed any light on this  ??
  Grails 1.3.6  .. </p>
  
  <p>Thanks </p>