开发者

At run time how to I verify that the database schema matches my objects?

I have开发者_JAVA百科 data access object that have been generated by SqlMetal, however the database is created by running a sql script.

Is there an easy way to verify that all table and columns names and type matches the attributes on the classes that SqlMetal created?


I guess the easiest way to do this would be to have some kind of version number hidden in a config table in your schema. Then on runtime check the version number returned.

Much easier than doing a full scan. Set the version number in your SQL script and somewhere in your data access object

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜