title: Simple.Data Lazy Loading Error
body: <p>I've been playing around with Simple.Data and have run across something that I can't understand.</p>
  
  <p>In my data, I have three tables: Hotel, Project, and ProjectMilestone.  A Hotel can have multiple Projects and a Project can have multiple ProjectMilestones.  I am using SQL Server and the tables are related by foreign keys in the standard way.</p>
  
  <p>When using Simple.Data, the following code will not work:</p>
  
  <pre><code>var db = Database.Open();
  var hotels = db.Hotel.All().Take(100);
  
  foreach (var hotel in hotels)
  {
      foreach (var project in hotel.Project)
      {
          foreach (var projectMilestone in project.ProjectMilestone)
          {
              //Do something here
          }
      }
  }
  </code></pre>
  
  <p>It throws an error that says:</p>
  
  <blockquote>
    <p>'Simple.Data.SimpleRecord' does not contain a definition for 'Project'</p>
  </blockquote>
  
  <p>However, the following code does work:</p>
  
  <pre><code>var db = Database.Open();
  var hotel = db.Hotel.FindByHotelID(1);
  
  foreach (var project in hotel.Project)
  {
      foreach (var projectMilestone in project.ProjectMilestone)
      {
          //Do something here
      }
  }
  </code></pre>
  
  <p>I don't understand this at all.  It seems to me that if the second one works the first one should as well.  Is the collection returned by the All().Take(100) not a collection of the same thing that FindByHotelID(1) returns?  Looking through the types, it looks like they should be.</p>
  
  <p>Anyone seen this before?</p>