开发者

hibernate and drop table

开发者 https://www.devze.com 2023-02-11 21:30 出处:网络
what happen if hibernate has a reference to table X, and then I rename table X to Y, rename table Z to X?

what happen if hibernate has a reference to table X, and then I rename table X to Y, rename table Z to X?

would it cause an exception in hibernate when clients try to access开发者_开发技巧 existing data? any pitfalls?


If the mappings are correct for a given table, it doesn't matter how the table was created (i.e. whether it was another table renamed). Perhaps use hbm2ddl.auto=validate option to let hibernate check whether everything is OK when it starts.

0

精彩评论

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