J'ai des problèmes avec la configuration de nHibernate avec sqlite.nHibernate & sqlite mappings
Voici le fichier hibernate.cfg.xml:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.SQLite20Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
<property name="connection.connection_string">Data Source=books.db;Version=3</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<property name="query.substitutions">true=1, false=0</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
</session-factory>
</hibernate-configuration>
et est ici le fichier de mappage (simplifié):
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly ="DataAccess" namespace="DataAccess.DOM">
<class name="Book" table="book">
<id name="id" type="integer" unsaved-value="null">
<generator class="increment"/>
</id>
<property name="isbn" type="string" length="25"/>
<property name="author" type="string" length="100"/>
</class>
</hibernate-mapping>
Le tableau:
create table book(
id INTEGER primary key,
author TEXT,
isbn TEXT,
);
Je reçois l'erreur: "Impossible de compiler le document de mappage: DataAccess.DOM.Book.hbm.xml"
Je développe en VS2008 sur Vista 32bit.
J'ai ajouté l'assembly System.Data.SQlite et défini pour copier local.
Des suggestions?
J'intégré le fichier hbm.xml le applicaiton travaillait avec SqlServerCe comme la base de données, mais je suis en train de passer à SQLite –
encore.. obtenir cette erreur. –