开发者

How to set the Property: hbm2dll.auto?

I would like to set the following property:

Property: hbm2dll.auto

  • validate = validates the whole database schema
  • create = creates the whole 开发者_Go百科database schema

How I can do this with Fluent NHibernate?


As far as I know this is not supported directly through the Fluent NHibernate API. However, you could just add it to the created configuration:

Configuration config = Fluently.Configure()
    .Database(...)
    .Mappings(m =>
        {
            ...
        })
    .BuildConfiguration();

config.SetProperty(NHibernate.Cfg.Environment.Hbm2ddlAuto, "validate");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜