Hey, I'm trying to run an NHibernate over sqlite. i have two projects: 1. Orange.Database - holds the pocos and daos and everything else 2. Orange.GUI - holds the gui...
when the program reach to the reach the:
Configuration config = new Configuration();
config.AddAssembly("Orange.Database");
sessionFactory = config.Configure().BuildSessionFactory();
an exception is thrown: "Could not compile the mapping document: Orange.Database.Pocos.City.hbm.xml " inner exception: "Could not find the dialect in the configuration"
city.hbm.xml:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="Orange.Database.Pocos">
<class name="City" table="Cities">
<id name="Id">
<column name="Id" sql-type="int" not-null="true"/>
<generator class="identity"/>
</id>
<property name="Name">
<column name="name" not-null="true"/>
</property>
<property name="IsTaxFree">
<column name="is_tax_free" not-null="true"/>
</property>
</class>
</hibernate-mapping>
I tried writting the assembly, and then removed it..
the app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configSections>
<section name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler,NHibernate"/>
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SQLiteDriver</property>
<property name="connection.connection_string">
Data Source=C:\Users\Nadav\Documents\Visual Studio 2005\Projects\orange\DB\OrangeDB\OrangeDB.db;Version=3
</property>
<property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
<property name="query.substitutions">true=1;false=0</property>
</session-factory>
</hibernate-configuration>
</configuration>
I've tried different location of the db file.. i have tried to remove the configSections and some other ideas i found on the web...
I'm using vs 2005 NHibernate version is 2.0.1.4000
Any suggestions?