AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Mar 4, 2007, 07:49   #1
Дошкольник
 
Join Date: Oct 2004
Location: Yerevan
Posts: 116
Rep Power: 4
Reputation: 12
Send a message via ICQ to Intel
NHibernate: Problem with Configuration

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>
here how i map a simple pesistent class:
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>
my persistent class (Application.SimpleTable) has valid structure for this configuration.

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?
Intel is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitors problem Awful Hardware 8 Jan 15, 2007 10:29
Georgiy Marganatis - No Problem!!! Rub MusiCity 0 Nov 9, 2006 23:27
PROBLEM: Unicode URLs Silver Web Development 1 Feb 27, 2006 05:42
Dial-up yahoo-mail access problem Tropical General 1 Nov 12, 2005 21:22
PHP 4.4.0 Problem... Mesrop Languages, Compilers and Interpreters 24 Nov 9, 2005 09:37


All times are GMT. The time now is 07:30.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link