nhibernate composite primary key

kanet0x

New Member
i have a problem with the composite primary key:i have a table named "simulateur", the composite primary key are Nombre_simulateur and Date class simulateur.hbm.xml :\[code\]<?xml version="1.0" encoding="utf-8" ?><hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true"> <class name="base_donnee.simulateur, base_donnee" table="simulateur"> <composite-id > <key-property name="Nombre_simulateur"> <column name="[Nombre_simulateur]" sql-type="int" /> </key-property> <key-property name="Date"> <column name="[Date]" sql-type="nvarchar(50)" /> </key-property> </composite-id> <property name="temps_connection" type="int" /> <property name="temps_envoi" type="int" /> <property name="temps_reception" type="int" /> </class></hibernate-mapping>\[/code\]but an exception appears : Could not compile the mapping document: base_donnee.simulateur.hbm.xml ---> System.InvalidOperationException: Could not find the dialect in the configurationmy file App.config is:\[code\]<?xml version="1.0"?><configuration> <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="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <property name="connection.connection_string_name">Northwind</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> <mapping assembly="base_donnee"/> </session-factory> </hibernate-configuration> <connectionStrings> <add name="Northwind" connectionString="Data Source=HP-PC\SQLEXPRESS;Initial Catalog=Simulation; Integrated Security=true" providerName="System.Data.SqlClient"/> </connectionStrings></configuration>\[/code\]i need help, any ideas?
 
Back
Top