如何关闭休眠工具数据库连接
在开发新项目时,我经常想要重新创建架构以应用创建的任何新实体或关系。 我喜欢在 eclipse 中使用 hibernate 工具,但是当想要删除并重新创建模式时会很痛苦 - 因为它似乎保持与数据库(在本例中为 postgres)的开放连接。
有谁知道是否有一种简单的方法可以让 eclipse hibernate 工具插件关闭所有连接?
When developing a new project I often want to re-create the schema to apply any new entities or relationships created. I like using hibernate tools in eclipse, but it's a pain when wanting drop and re-create the schema - since it seems to maintain open connections to the db (postgres in this case).
Does anybody know if there is an easy way of getting the eclipse hibernate tools plugin to close off all connections?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
告诉您我也使用 Hibernate Tools 来创建架构可能会有所帮助。 我从来没有遇到过你所描述的问题。 现在我使用 liquibase 进行架构迁移。 这是一种不同的方法,但我喜欢它。
It might be helpful to tell you, that i was using Hibernate Tools for creating the schema, too. I never had the problem you are describing. Nowadays i use liquibase for schema migration. It is a different approach, but i like it.
我以前从未遇到过这个问题,但我们使用 Maven 从命令行运行来创建/更新架构,并使用 DBUnit 来上传数据。 然后回到椭圆...
I'v never hit this problem before, but we use Maven run from the command line to create/update the schema and also DBUnit to upload data. Then back to elcipse...