开发者

Why does this keep recreating my database?

I am using fluent nhibernate and have this line

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

now this keeps on recreating my database. Am I misunderstanding the parameters?

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 ex开发者_高级运维ecuted.
format
    true if the ddl should be nicely formatted instead of one statement per line.

I thought setting the justDrop to false would stop my db from being recreated if it exists.


If you set export to true it will drop a recreate your database.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜