title: Codeigniter Undefined property: xxxx_model::$db only from Model
body: <p>First the Model class:</p>
  
  <pre><code>    class Xxxx_model extends Model
      {
        function XxxxModel()
        {
          parent::Model();
          $this-&gt;load-&gt;database();
        }
  
        function isInDatabase()
        {
          // Please ignore the sql query, it's just to show some random sql code with results
  11.      $result = $this-&gt;db-&gt;query('SELECT * FROM someTable WHERE ...');
          $numberOfRows = $result-&gt;num_rows();
          ... 
          return $test;
        }
      }
  </code></pre>
  
  <p>Now the controller:</p>
  
  <pre><code>function someLogic()
  {
    $this-&gt;load-&gt;model('xxxx_Model', 'xxxxModel'); // not necessary to specify
    $this-&gt;xxxxModel-&gt;isInDatabase();
  }
  </code></pre>
  
  <p>When I run this I get the error:</p>
  
  <pre><code>Severity: Notice  --&gt; Undefined property: Xxxx_model::$db .../xxxx_model.php line 11
  </code></pre>
  
  <p>I have no idea why this is. If I put the db code in the controller it seems to work, it's only with this setup in the model that it fails. I can't for the life of me figure out where the code is astray...</p>