2017-09-13 61 views
-1

不能添加組件冬眠在Visual Studio 2012的NHibernate我得到這個錯誤NHibernate的SQLITE3分貝不能添加組件冬眠

cfg.xml中

<?xml version="1.0" encoding="utf-8" ?> 
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > 
    <session-factory> 
    <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property> 
    <property name="connection.connection_string"> 
     Data Source=SicakSatisDB.db;Version=3; 
    </property> 
    <property name="dialect">NHibernate.Dialect.SQLiteDialect</property> 
    <property name="proxyfactory.factory_class"> 
NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> 
     </session-factory> 
    </hibernate-configuration> 
+0

指定和詳細你得到的錯誤 – dove

回答

0
cfg.xml 

<?xml version="1.0" encoding="utf-8" ?> 
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > 
    <session-factory> 
    <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property> 
    <property name="connection.connection_string"> 
     Data Source=SicakSatisDB.db;Version=3; 
    </property> 
    <property name="dialect">NHibernate.Dialect.SQLiteDialect</property> 
    <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> 
    </session-factory> 
</hibernate-configuration> 

hmb.xml文件

<?xml version="1.0" encoding="utf-8" ?> 
<hibernate-mapping assembly="hibernate" namespace="Domain" xmlns="urn:nhibernate-mapping-2.2"> 
    <class name="Stokkartitbl" table="StokKartiTbl" lazy="true" > 
    <id name="Id" column="ID" /> 
    <property name="Stokkodu"> 
     <column name="StokKodu" type="nchar" not-null="false" /> 
    </property> 
    <property name="Stokadi1"> 
     <column name="StokAdi1" type="nvarchar" not-null="false" /> 
    </property> 
    <property name="Stokadi2"> 
     <column name="StokAdi2" type="nvarchar" not-null="false" /> 
    </property> 
    <property name="Birim"> 
     <column name="Birim" type="int" not-null="false" /> 
    </property> 
    <property name="Satisfiyati"> 
     <column name="SatisFiyati" type="money" not-null="false" /> 
    </property> 
    <property name="Alisfiyati"> 
     <column name="AlisFiyati" type="money" not-null="false" /> 
    </property> 
    <property name="Aliskdvid"> 
     <column name="AlisKDVID" type="int" not-null="false" /> 
    </property> 
    <property name="Satiskdvid"> 
     <column name="SatisKDVID" type="int" not-null="false" /> 
    </property> 
    <property name="Grupid"> 
     <column name="GrupID" type="int" not-null="false" /> 
    </property> 
    <property name="Reyonid"> 
     <column name="ReyonID" type="int" not-null="false" /> 
    </property> 
    </class>