TundeMajor
asked on
NHibernate: getting nhibernate.configuration exception when using nhybirnate-mapping objects,
I'm using NHibernate on vsts 2005 with SQL Server 2005 and in my web.config file I have something like this
<mapping resource ="employee.hbm.xml" assembly="ImageSite" />
but i keep getting this exception: Resource not found: employee.hbm.xml
cant figure out what i m doing wrongly.
<mapping resource ="employee.hbm.xml" assembly="ImageSite" />
but i keep getting this exception: Resource not found: employee.hbm.xml
cant figure out what i m doing wrongly.
ASKER
you mean employee.hbm.xml , the file i created. the code is attached
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="ImageSite" assembly="ImageSite">
<class name="employee" table="employee">
<id name="pin">
<column name="pin" sql-type="nvarchar(50)" not-null="true" />
<generator class="native" />
</id>
<property name="firstname">
<column name="firstname" sql-type="nvarchar(50)" length="50" not-null="false" />
</property>
<property name="lastname">
<column name="lastname" sql-type="nvarchar(50)" length="50" not-null="false" />
</property>
<property name="othername">
<column name="othername" sql-type="nvarchar(50)" length="50" not-null="false" />
</property>
<property name="age">
<column name="age" sql-type="int" not-null="false" />
</property>
</class>
</hibernate-mapping>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you generated those xml mappings...?