title: NHibernate Mapping Error with v4.0
body: <p>I am using VS 2013 32 bit, nHibernate v4.0.0.4000. 
  I am new to nHiberNate and is there anyway I can avoid mapping creation without using fluent. I need good working sample which I could not find so far.</p>
  
  <p>I am getting this error for below code.  </p>
  
  <blockquote>
    <p>Additional information: Could not compile the mapping document: C:\Project...\Some\Models\NHibernate\Mappings\SomeInfo.hbm.xml</p>
    
    <p>InnerException: {"Problem trying to set property type by reflection"}</p>
  </blockquote>
  
  <p>Code &amp; Mapping -----</p>
  
  <pre><code>My class:
  namespace Some.Models
  {
      public class SomeInfo 
      {
          public long     Form_Id { get; set; }   
          public string   Account_Id { get; set; } 
          public char     Entity { get; set; }
          public string   Name { get; set; }
          public decimal  Ownership_Percent { get; set; } 
      }
  }
  </code></pre>
  
  <p>Mapping Instance Creation:</p>
  
  <pre><code>namespace Some.Models
  {
      public class Hibernate_Connection
      {
          ISessionFactory sessionFactory;        
          ISession OpenSession()
          {
              if (sessionFactory == null)
              {
                  var cgf = new Configuration();
                  var data = cgf.Configure(HttpContext.Current.Server.MapPath(@"Models\NHibernate\Configuration\hibernate.cfg.xml"));
                  cgf.AddDirectory(new System.IO.DirectoryInfo(HttpContext.Current.Server.MapPath(@"Models\NHibernate\Mappings")));
                  sessionFactory = data.BuildSessionFactory();
              }
              return sessionFactory.OpenSession();
          }
  </code></pre>
  
  <p>Mapping :Models/NHiberNate/Mappings/SomeInfo.hbm.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
  &lt;hibernate-mapping 
  xmlns="urn:nhibernate-mapping-2.2" 
  assembly="Some" 
  namespace="Some.Models" 
  auto-import="true"&gt; 
  &lt;class name="SomeInfo" table="Some_Table" lazy="false"&gt; 
    &lt;!--&lt;id name="ID" column="Form_Id" Type="Long"&gt;
         &lt;generator class="native"&gt;&lt;/generator&gt; &lt;/id&gt;--&gt;
    &lt;id name="ID" column="Form_Id"&gt; 
       &lt;generator class="native"&gt;&lt;/generator&gt; 
    &lt;/id&gt;
    &lt;property name="Form_Id" column="Form_Id"&gt;&lt;/property&gt; 
    &lt;property name="Account_Id" column="Account_Id"&gt;&lt;/property&gt; 
    &lt;property name="Entity" column="Entity"&gt;&lt;/property&gt; 
    &lt;property name="Name" column="Name"&gt;&lt;/property&gt;   
    &lt;property name="Ownership_Percent" access="property" 
              column="Ownership_Percent" type="Decimal"&gt;&lt;/property&gt; 
  &lt;/class&gt; 
  &lt;/hibernate-mapping&gt; 
  </code></pre>