Hi wolli, thanks for the help but I'm now getting further problems. I'm getting the following exception:
TestProject.MyProject.FetchApplicationByReference : NHibernate.MappingException : Could not compile the mapping document: MyProject.BusinessEntities.JobApplication.hbm.xml
----> NHibernate.HibernateException : Could not instantiate dialect class NHibernate.Dialect.OracleDialect
----> System.TypeLoadException : Could not load type NHibernate.Dialect.OracleDialect. Possible cause: no assembly name specified.
My hibernate.cfg.xml is as follows:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.OracleDialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">Data Source=JOBDB; User ID=***; Password=***</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="show_sql">true</property>
<property name="max_fetch_depth">3</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<mapping assembly="MyProject.BusinessEntities" />
</session-factory>
</hibernate-configuration>
Does any of this look wrong based on my source code above above? My mapping file is set to embedded resource and to instantiate the Configuration I've used the following lines:
Code:
Configuration config = new Configuration().Configure().AddAssembly("MyProject.BusinessEntities");
m_sessionFactory = config.BuildSessionFactory();