开发者

Generated sql-script in Castle ActiveRecord is missing terminating semicolon

开发者 https://www.devze.com 2023-02-08 02:00 出处:网络
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-creat

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>开发者_StackOverflow社区

Any clues?


Use ActiveRecordStarter.SetSchemaDelimiter("my separator") before calling GenerateCreationScripts()

0

精彩评论

暂无评论...
验证码 换一张
取 消