title: Nhibernate - Could not find a getter for property
body: <p>I'm trying to build the MusicStore Nhibernate port, and I've run into this error:</p>
  
  <blockquote>
    <p>Could not find a getter for property 'OrderInfo' in class
    'MvcMusicStore.Models.OrderDetail'</p>
  </blockquote>
  
  <p>with the following inner exception:</p>
  
  <blockquote>
    <p>NHibernate.PropertyNotFoundException: Could not find a getter for
    property 'OrderInfo' in class 'MvcMusicStore.Models.OrderDetail'</p>
  </blockquote>
  
  <p>while using the following mapping for OrderDetail:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="MvcMusicStore" namespace="MvcMusicStore.Models"&gt;
    &lt;class name="OrderDetail"&gt;
      &lt;id name="Id"&gt;
        &lt;generator class="hilo" /&gt;
      &lt;/id&gt;
  
      &lt;many-to-one name="OrderInfo" column="OrderInfoId" /&gt;
      &lt;property name="Quantity" /&gt;
      &lt;property name="UnitPrice" /&gt;
  
      &lt;many-to-one name="Album" column="AlbumId" /&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>And the C# class definition:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
      namespace MvcMusicStore.Models
      {
          public class OrderDetail : Entity
          {
              public virtual OrderInfo Order { get; set; }
              public virtual Album Album { get; set; }
              public virtual int Quantity { get; set; }
              public virtual decimal UnitPrice { get; set; }
          }
      }
  </code></pre>
  
  <p>The mapping for the OrderInfo class is the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="MvcMusicStore" namespace="MvcMusicStore.Models"&gt;
    &lt;class name="OrderInfo"&gt;
      &lt;id name="Id"&gt;
        &lt;generator class="hilo" /&gt;
      &lt;/id&gt;
  
      &lt;property name="OrderDate" /&gt;
      &lt;property name="Username" /&gt;
      &lt;property name="FirstName" /&gt;
      &lt;property name="LastName" /&gt;
      &lt;property name="Address" /&gt;
      &lt;property name="City" /&gt;
      &lt;property name="State" /&gt;
      &lt;property name="PostalCode" /&gt;
      &lt;property name="Country" /&gt;
      &lt;property name="Phone" /&gt;
      &lt;property name="Email" /&gt;
      &lt;property name="Total" /&gt;
  
      &lt;set name="OrderDetails"&gt;
        &lt;key column="OrderInfoId" /&gt;
        &lt;one-to-many class="OrderDetail" /&gt;
      &lt;/set&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>and it has the following C# class definition:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
  namespace MvcMusicStore.Models
  {
      public class OrderInfo : Entity
      {
          public virtual DateTime OrderDate { get; set; }
          public virtual string Username { get; set; }
          public virtual string FirstName { get; set; }
          public virtual string LastName { get; set; }
          public virtual string Address { get; set; }
          public virtual string City { get; set; }
          public virtual string State { get; set; }
          public virtual string PostalCode { get; set; }
          public virtual string Country { get; set; }
          public virtual string Phone { get; set; }
          public virtual string Email { get; set; }
          public virtual string Total { get; set; }
  
          public virtual ICollection&lt;OrderDetail&gt; OrderDetails { get; set; }
      }
  }
  </code></pre>
  
  <p>The Entity class is an abstract class which adds an Guid ID property. What am I doing wrong? I honestly can't see any faults with my mappings.</p>