Castle ActiveRecord和SQLite联合使用的怪问题
时间:2010-11-27 来源:白昼
当配置文件为
<activerecord> <config> <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SQLite20Driver"/> <add key="hibernate.dialect" value="NHibernate.Dialect.SQLiteDialect"/> <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> <add key="hibernate.connection.connection_string" value="Data Source=Data.db;Version=3"/> </config> </activerecord>
在Initialize的时候就会抛出异常,提示类不能被加载到Nhibernate中。
但如果把配置文件改成
<activerecord> <config> <add key="connection.driver_class" value="NHibernate.Driver.SQLite20Driver"/> <add key="dialect" value="NHibernate.Dialect.SQLiteDialect"/> <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> <add key="connection.connection_string" value="Data Source=Data.db;Version=3"/> </config> </activerecord>
就是去掉keyvalue中的"hibernate."就没问题了,真是怪事。难道Nhibernate讨厌跟Hibernate划等号????
相关阅读 更多 +