2011-02-01 59 views
1

當調用靜態方法時ActiveRecordStarter.GenerateCreationScripts("FileName.sql"); Castle創建一個包含sql-script的文件,該文件用於重新初始化我的數據庫(刪除並重新創建表,約束等)。這是很方便,但由於某些原因,劇本缺少結尾的分號;在腳本中的每個語句後()。我必須手動輸入分號 - 有沒有辦法強制Castle爲我做?Castle ActiveRecord中生成的sql腳本缺少終止分號

我用的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> 

任何線索?

回答

1

使用ActiveRecordStarter.SetSchemaDelimiter("my separator")調用GenerateCreationScripts()

+0

就像一個魅力面前 - THX! – Coffeeshopboy 2011-02-03 11:48:55