2010-12-10 14 views
0

現在、MVC 3.5でnhibernateを使用しようとしています。NHibernate [MappingException:マッピングドキュメントをコンパイルできませんでした:iMed.Models.Device.hbm.xml]

自分のnhibernate.cfg.xmlを自分のMVCプロジェクトに配置しました。 プロジェクトのスクリーングラブをご覧ください。どちらのXMLファイルも組み込みリソースに設定されています。

私はDeviceRepository.csを持っています。これには、永続性のためにDevice.csを使用するメソッドがあります。ここ

ここnhibernate.cfg.xml

<!-- properties --> 
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> 
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> 
<property name="connection.connection_string">Server=192.168.1.5;Database=imed_development;User ID=root;Password=lights337</property> 
<property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> 

<!-- mapping files --> 
<mapping resource="iMed.Models.Device.hbm.xml" assembly="iMed" /> 

のXMLはDevice.hbm.xmlのXMLである

<?xml version="1.0" encoding="utf-8" ?> 
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 
    <class name="iMed.Models.Device" table="devices"> 
    <id name="Id" column="ID" type="int"> 
     <generator class="native"></generator> 
    </id> 
    <property name="Identifier" column="identifier" type="String"></property> 
    </class> 
</hibernate-mapping> 

私は現在、私はこれまでかなり新しいです

{"Could not compile the mapping document: iMed.Models.Device.hbm.xml"} 
{"persistent class iMed.Models.Device not found"} 

を得ている、任意の入力が大幅に... ...

を事前に

おかげでいただければ幸いですPatrick

答えて

0

あなたのマッピングでは存在しないクラスを参照していると言っています。

関連する問題