开发者

How NHibernate handle the schema change when application has run

I know NHibernate just now and it reverse my perspective about data 开发者_如何学JAVAaccess.Now I know NHibernate CAN generate the database schema by itself when mapping.

But an more usual scenario is changing the database schema when the application has been running and some data has been inserted into the database. At this time, if I want to add a new column in some table(add a property for a entity), how should I do?

I can't delete the previous database and create a new one because I need the existing data.


NHibernate has SchemaUpdate, but more generally you'd want to use a DB migration tool instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜