Castle ActiveRecord 中生成的 sql 脚本缺少终止分号
调用静态方法 ActiveRecordStarter.GenerateCreationScripts("FileName.sql");
Castle 会创建一个包含 sql 脚本的文件,我用它来重新初始化数据库(删除并重新创建表、约束等) .)。这非常方便,但由于某种原因,脚本中的每个语句后面缺少终止分号 (;)。我必须手动输入分号 - 有没有办法强制 Castle 为我做这件事?
我使用Castle ActiveRecord 2.1.2.0,数据库是Oracle 11g。
我的配置文件:
<configSections>
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<connectionStrings>
<add name="main" connectionString="Data Source=myServer.com/SID;UserID=user;Password=password;" />
</connectionStrings>
<activerecord isWeb="true">
<config>
<add key="connection.driver_class" value="NHibernate.Driver.OracleClientDriver" />
<add key="dialect" value="NHibernate.Dialect.Oracle10gDialect" />
<add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
<add key="connection.connection_string_name" value="main" />
</config>
</activerecord>
有什么线索吗?
When calling the static method ActiveRecordStarter.GenerateCreationScripts("FileName.sql");
Castle creates a file containing an sql-script, which I use to reinitialize my database (drop and re-create tables, constraints etc.). This is very convenient, but for some reason the script is missing a terminating semicolon (;) after each statement in the script. I have to put in the semicolons manually - is there a way to force Castle to do it for me?
I use Castle ActiveRecord 2.1.2.0, and the database is Oracle 11g.
My config file:
<configSections>
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<connectionStrings>
<add name="main" connectionString="Data Source=myServer.com/SID;UserID=user;Password=password;" />
</connectionStrings>
<activerecord isWeb="true">
<config>
<add key="connection.driver_class" value="NHibernate.Driver.OracleClientDriver" />
<add key="dialect" value="NHibernate.Dialect.Oracle10gDialect" />
<add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
<add key="connection.connection_string_name" value="main" />
</config>
</activerecord>
Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在调用
GenerateCreationScripts()
之前使用ActiveRecordStarter.SetSchemaDelimiter("my seperator")
Use
ActiveRecordStarter.SetSchemaDelimiter("my separator")
before callingGenerateCreationScripts()