为什么这会继续重建我的数据库?

时间:2011-10-01 04:38:37

标签: nhibernate fluent-nhibernate

我正在使用流利的nhibernate并拥有此行

 private static void BuidSchema(NHibernate.Cfg.Configuration config)
    {
        new SchemaExport(config).Execute(false,true,false);
    }

现在这样可以继续重建我的数据库。我误解了参数吗?

documentation

script
    true if the ddl should be outputted in the Console.
export
    true if the ddl should be executed against the Database.
justDrop
    true if only the ddl to drop the Database objects should be executed.
format
    true if the ddl should be nicely formatted instead of one statement per line.

我认为将justDrop设置为false会阻止我的db重新创建(如果存在)。

1 个答案:

答案 0 :(得分:1)

如果将export设置为true,则会删除重新创建数据库。

相关问题