title: Wrong mapping NHibernate 3.3
body: <p>Do you know where is problem with mapping file?</p>
  
  <p>Eroor:
  Could not compile the mapping document: NHibernateTutorial.Mapping.Character.hbm.xml</p>
  
  <p>I Add all my files. </p>
  
  <p>Character</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace NHibernateTutorial.Domain
  {
      public class Character
      {
          public virtual Guid Id { get; set; }
          public virtual string Name { get; set; }
          public virtual int HealthPoints { get; set; }
          public virtual int Mana { get; set; }
          public virtual string Profession { get; set; }
      }
  }
  </code></pre>
  
  <p>Mapping (<strong>Character.hbm.xml</strong>)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                     assembly="NHibernateTutorial"
                     namespace="NHibernateTutorial.Domain"&gt;
  
    &lt;class name="Character"&gt;
      &lt;id name="Id"&gt;
        &lt;generator class="guid" /&gt;
      &lt;/id&gt;
      &lt;property name="Name" /&gt;
      &lt;property name="HealthPoints" /&gt;
      &lt;property name="Mana" /&gt;
      &lt;property name="Profession" /&gt;
    &lt;/class&gt;
  
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>Error</p>
  
  <p><img src="https://i.stack.imgur.com/LL1w1.jpg" alt="enter image description here"></p>
  
  <p>ConnectionString</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"&gt;
    &lt;session-factory&gt;
      &lt;property name="connection.provider"&gt;NHibernate.Connection.DriverConnectionProvider&lt;/property&gt;
      &lt;property name="dialect"&gt;NHibernate.Dialect.MsSql2012Dialect&lt;/property&gt;
      &lt;property name="connection.driver_class"&gt;NHibernate.Driver.SqlClientDriver&lt;/property&gt;
      &lt;property name="connection.connection_string"&gt;Data Source=RAFAL-KOMPUTER\MSSQLSERVER4;Database=rafal;Trusted_Connection=True;&lt;/property&gt;
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>NHibernateHelper</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using NHibernate;
  using NHibernate.Cfg;
  using NHibernateTutorial.Domain;
  
  namespace NHibernateTutorial
  {
      public class NHibernateHelper
      {
          private static ISessionFactory _sessionFactory;
  
          private static ISessionFactory SessionFactory
          {
              get
              {
                  if (_sessionFactory == null)
                  {
                      var configuration = new Configuration();
                      configuration.Configure();
                      configuration.AddAssembly(typeof(Character).Assembly);
                      _sessionFactory = configuration.BuildSessionFactory();
                  }
                  return _sessionFactory;
              }
          }
  
          public static ISession OpenSession()
          {
              return SessionFactory.OpenSession();
          }
  
      }
  }
  </code></pre>
  
  <p>Character Repository</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using NHibernateTutorial.Domain;
  using NHibernate;
  
  namespace NHibernateTutorial
  {
      public class CharacterRepository
      {
          public void Add(Character newCharacter)
          {
              using (ISession session = NHibernateHelper.OpenSession())
              {
                  using (ITransaction transaction = session.BeginTransaction())
                  {
                      session.Save(newCharacter);
                      transaction.Commit();
                  }
              }
          }
  
          public Character GetCharacterByName(string name)
          {
              using (ISession session = NHibernateHelper.OpenSession())
              {
                  var result = session.QueryOver&lt;Character&gt;().Where(x =&gt; x.Name == name).SingleOrDefault();
                  return result ?? new Character();
              }
          }
  
          public void Update(Character newCharacter)
          {
              using (ISession session = NHibernateHelper.OpenSession())
              {
                  using (ITransaction transaction = session.BeginTransaction())
                  {
                      session.Update(newCharacter);
                      transaction.Commit();
                  }
              }
          }
  
          public void Delete(Character newCharacter)
          {
              using (ISession session = NHibernateHelper.OpenSession())
              {
                  using (ITransaction transaction = session.BeginTransaction())
                  {
                      session.Delete(newCharacter);
                      transaction.Commit();
                  }
              }
          }
  
      }
  }
  </code></pre>
  
  <p>Exception Details:
  <img src="https://i.stack.imgur.com/wjeUn.jpg" alt="enter image description here"></p>