![]() |
![]() | #1 |
Дошкольник Join Date: 10 2004 Location: Yerevan Age: 33
Posts: 116
Downloads: 8 Uploads: 0
Reputation: 2 | 0 | ![]()
Hi guys, i'm getting confused with configuration errors of Hibernate for .NET: I'm trying to map a simple MySQL table, which is completely independent from other tables. I looked through docs, forums, but didn't get any useful information/response. I'm using .NET 2.0, MySQL 5.0, and NHibernatie 1.0.4 in my hibernate.cfg.xml sesson-factory scope i have: Code: <session-factory> <property name="dialect">NHibernate.Dialect.MySQLDialect</property> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> <property name="connection.connection_string">Server=myHost;Database=realty;User ID=myUser;Password=myPass</property> <mapping assembly="Application.DB" /> </session-factory> Code: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="Application.DB" assembly="Application.DB"> <class name="SimpleTable" table="simpletable"> <!-- A 32 hex character is our surrogate key. It's automatically generated by NHibernate with the UUID pattern. --> <id name="Id"> <column name="id" sql-type="int" not-null="true"/> <generator class="uuid.hex" /> </id> <property name="Text"> <column name="text" /> </property> </class> </hibernate-mapping> Also i referenced MySQL driver to my project. When IIS is trying to Configure an instance, it throws an exception Here's the Exception Message: Could not load file or assembly 'Appartment.DB' or one of its dependencies. The system cannot find the file specified. Actually i think that the problem is in <mapping> tag's attribute(s), what should i put there? |
![]() |