开发者

NHibernate 2 hbm2ddl.auto update not adding columns

开发者 https://www.devze.com 2023-03-13 06:05 出处:网络
I wanted to add 2 columnts to an MSSQL table by changing class and mapping files, using: 开发者_高级运维<property name=\"hbm2ddl.auto\">update</property>

I wanted to add 2 columnts to an MSSQL table by changing class and mapping files, using:

开发者_高级运维<property name="hbm2ddl.auto">update</property>

According to the documentation, this should result in automatically calling something like this near the session start:

SchemaUpdate su = new SchemaUpdate(_cfg);
su.Execute(true, true);

However, the columns are not there (unless I manually add these lines). What am I missing? Is it a bug in this NHibernate version or ...?

Thanks

v.

UPDATE: Certain sources mention update as a valid option, while others only offer create and create-drop. Is this the answer?


No, update option is commented out in source of this NHibernate build. It just doesn't work.

0

精彩评论

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

关注公众号