title: Cannot access properties on a populate()'d object from Mongoose?
body: <p>This is very odd... I'm using populate() with a ref to fill in an array within my schema, but then the properties are inaccessible. In other words, the schema is like this:</p>
  
  <pre><code>new Model('User',{
      'name': String,
      'installations': [ {type: String, ref: 'Installations'} ],
      'count': Number,
  }
  </code></pre>
  
  <p>Of course, Insallations is another model.</p>
  
  <p>Then I find &amp; populate a set of users...</p>
  
  <pre><code>model.find({count: 0}).populate('installations').exec( function(e, d){
      for(var k in d)
      { 
          var user = d[k];
          for(var i in user.installations)
          {
              console.log(user.installations[i]);
          }
      }
  } );
  </code></pre>
  
  <p>So far so good! I see nice data printed out, like this:</p>
  
  <pre><code>{ runs: 49,
  hardware: 'macbookpro10,1/x86_64',
  mode: 'debug',
  version: '0.1' }
  </code></pre>
  
  <p>However, if I try to actually ACCESS any of those properties, they're all undefined! For example, if I add another console log:</p>
  
  <pre><code>console.log(user.installations[i].mode);
  </code></pre>
  
  <p>Then I see "undefined" printed for this log.
  If I try to operate on the object, like this:</p>
  
  <pre><code> Object.keys(user.installations[i]).forEach(function(key) { } );
  </code></pre>
  
  <p>Then I get a typical "[TypeError: Object.keys called on non-object]" error, indicating that user.installations[i] is not an object (even though it is outputted to the console as if it were). So, I even tried something ugly like...</p>
  
  <pre><code>var install = JSON.parse(JSON.stringify(user.installations[i]));
  console.log(install, install.mode);
  </code></pre>
  
  <p>And, again, the  first output (install) is a nice object containing the property 'mode'... but the 2nd output is undefined.</p>
  
  <p>What gives? </p>