oracle 配置文件如下:
<hibernate-configuration xmlns="urn:hibernate-configuration-2.2"> <!-- an ISessionFactory instance --> <session-factory xmlns="urn:nhibernate-configuration-2.2"> <!-- properties --> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property> <property name="dialect">NHibernate.Dialect.Oracle10gDialect</property> <property name="connection.connection_string">Data Source=dev;User ID=scdns;Password=scdns</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> <property name="show_sql">true</property> <property name="use_outer_join">true</property> <property name="use_proxy_validator">false</property> </session-factory> </hibernate-configuration>
ormapping 文件 hbmxml 由 MyGeneration生成。
主要报错有
1、System.ArgumentException : 列“Reserved Word”不属于表 ReservedWords。
能否提供Mysql链接的一个完整的demo。谢谢!
添加一个属性设置:
<property name="hbm2ddl.keywords">none</property>