title: nHibernate & sqlite mappings
body: <p>I'm having real problems with setting up nHibernate with sqlite.</p>
  
  <p>Here is the hibernate.cfg.xml file:</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.SQLite20Dialect&lt;/property&gt;
      &lt;property name="connection.driver_class"&gt;NHibernate.Driver.SQLite20Driver&lt;/property&gt;
      &lt;property name="connection.connection_string"&gt;Data Source=books.db;Version=3&lt;/property&gt;
      &lt;property name="proxyfactory.factory_class"&gt;NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle&lt;/property&gt;
      &lt;property name="query.substitutions"&gt;true=1, false=0&lt;/property&gt;
  
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;property name="format_sql"&gt;true&lt;/property&gt;
  
  
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>and here is the (simplified) mapping file:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly ="DataAccess" namespace="DataAccess.DOM"&gt;
    &lt;class name="Book" table="book"&gt;
      &lt;id name="id" type="integer" unsaved-value="null"&gt;
        &lt;generator class="increment"/&gt;
      &lt;/id&gt;
  
      &lt;property name="isbn" type="string" length="25"/&gt;
      &lt;property name="author" type="string" length="100"/&gt;
  
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>The table:</p>
  
  <pre><code>create table book(
    id INTEGER primary key,
    author TEXT,
    isbn TEXT,
  );
  </code></pre>
  
  <p>I get the error: 
  "Could not compile the mapping document: DataAccess.DOM.Book.hbm.xml"                   </p>
  
  <p>I'm developing in VS2008 on Vista 32bit.</p>
  
  <p>I've added the System.Data.SQlite assembly and set to copy local.</p>
  
  <p>Any suggestions?</p>