title: What are the rules of when propel's toArray() function will return referenced objects or just the top level?
body: <p>I can't seem to nail the exact rule of thumb as to what is added to an array when using <code>toArray()</code>, insomuch that if I was to do something like this:</p>
  
  <pre><code>$sheep = SheepQuery::create()-&gt;find();
  foreach ($sheep as $sheepii) {
    $sheepii-&gt;getShepherd();
  }
  return $sheep-&gt;toArray();
  </code></pre>
  
  <p>or some variation of it, sometimes I seem to get results with both the columns from the sheep table <em>and</em> their sub-arrays with the shepherd, but sometimes it doesn't seem to include it, so I have to do something like add the values to a new array as I loop over.</p>
  
  <p>Can anyone point out (a link explaining) why this happens and the rules behind it so I'm not blindly guessing, and if there's a nicer way of doing the same thing above by all means I'm open to suggestion.</p>