Hibernate version: NHibernate 2.0.0.4000 (2.0.0.4000)
Hi,
following problem:
add the properties in a hashtable
Code:
propsRet["Environment.ConnectionProvider"] = "NHibernate.Connection.DriverConnectionProvider";
propsRet["Environment.Dialect"] = "NHibernate.Dialect.MySQL5Dialect";
propsRet["Environment.ConnectionDriver"] = "NHibernate.Driver.MySqlDataDriver";
propsRet["Environment.ConnectionString"] = "Server=" + iniServer + ";Database = " + iniDatabase + ";user id=" + iniUser + "; password=" + iniPasswort + "; port=" + iniPort;
propsRet["Environment.CommandTimeout"] = "5000";
build configuration and set propertiesCode:
cfgTemp = new Configuration();
foreach (DictionaryEntry de in propsTemp)
{
cfgTemp.SetProperty(de.Key.ToString(), de.Value.ToString());
}
// This Assembly allways
cfgTemp.AddAssembly("BaseLib");
When "AddAssembly" i have this error:
Code:
2008-09-26 13:43:59,124 [1] ERROR NHibernate.Cfg.Configuration [(null)] [LogAndThrow] - Could not compile the mapping document: BaseLib.Server.DataBase.SystemTable.Mapping.BaseMenuItemInfo.hbm.xml
NHibernate.MappingException: Could not compile the mapping document: BaseLib.Server.DataBase.SystemTable.Mapping.BaseMenuItemInfo.hbm.xml ---> System.InvalidOperationException: Could not find the dialect in the configuration
bei NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props)
bei NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
Mapping XML:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="SWP.FWK.Server.DataBase.SystemTable.BaseMenuItemInfo, BaseLib" table="menustructure">
<id name="ID" unsaved-value="0">
<column name="id" sql-type="bigint" not-null="true" unique="true" index="PRIMARY"/>
<generator class="native">
<param name="sequence">id_sequence</param>
</generator>
</id>
<property name="MenuType">
<column name="menuType" sql-type="smallint" not-null="true"/>
</property>
<property name="MenuStructure">
<column name="menuStructure" length="30" sql-type="varchar" not-null="true"/>
</property>
<property name="ModulPgm">
<column name="modulPgm" sql-type="smallint" not-null="true"/>
</property>
<property name="ModPgmNumber">
<column name="modPgmNumber" sql-type="int" not-null="true"/>
</property>
<property name="DemoPoint">
<column name="demoPoint" sql-type="tinyint" not-null="true"/>
</property>
<property name="Createuser">
<column name="createuser" length="10" sql-type="varchar" not-null="true"/>
</property>
<property name="Createdate">
<column name="createdate" sql-type="date" not-null="true"/>
</property>
<property name="Changeuser">
<column name="changeuser" length="10" sql-type="varchar" not-null="true"/>
</property>
<property name="Changedate">
<column name="changedate" sql-type="timestamp" not-null="true"/>
</property>
</class>
</hibernate-mapping>
The earlier Version 1.2 runs without problems
ThankĀ“s for help