用于创建基于 mysql 数据库的基本映射的 Hibernate 工具
是否有任何工具可以查看数据库并生成基本映射文件?
如果它可以使用数据库并使用注释创建实际模型(java 类),那就太好了,但不确定是否存在?
Are there any tools that can look at a database, and generate the basic mapping files?
It would be great if it could take a database, and create the actual model (java classes) with annotations, but not sure if that exists?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Hibernate 3 有一个名为 Hibernate Tools 的工具集,它提供了 Eclipse 插件和 Ant 任务,两者都支持逆向工程:
对于 Eclipse 插件,请查看 文档的这一部分。对于 Ant 任务,请查看有关 逆向工程以及可选的如何控制它。
请注意,其他 IDE 也提供对逆向工程的支持(请参阅 Hibernate Reverse Engineering for Netbeans 6.5 和 从 IntelliJ 的数据库架构生成持久性映射)。
Hibernate 3 has a toolset called Hibernate Tools that provides an Eclipse plugin and an Ant task that both support Reverse Engineering:
For the Eclipse plugin, have a look at this section of the documentation. For the Ant task, have a look at the section about reverse engineering and optionally how to control it.
Note that other IDEs also provide support for reverse engineering (see Hibernate Reverse Engineering for Netbeans 6.5 and Generating Persistence Mappings from Database Schema for IntelliJ).
我只是偶然发现了这个问题,我想我已经找到了一个完美的工具来完成这项工作。
http://hibernatepojoge.sourceforge.net/
功能:(如果您是懒得浏览提供的链接)
还支持:
我还想说的是设置这很简单;您只需要有一个 hibernate 配置文件和从站点下载的 jar 文件即可。然后只需执行一个 jar 文件,并将
config.xml
作为参数传递即可!I just happened to stumble across this problem and I think I have found a perfect tool for the job.
http://hibernatepojoge.sourceforge.net/
Features : (in case you are lazy to go through the provided link)
Also supports:
I would also like to say that setting this up is quite straight forward; You just have to have a hibernate configuration file and the jar file downloaded from the site. Then it's just a matter executing a jar file, passing the
config.xml
as a parameter!如果您使用的是 eclipse 或 ant...
Jboss 工具
If you are using eclipse or ant...
Jboss tools
您可能会在这里找到您需要的内容,我是即时找到的:MyGeneration。
我知道还有其他人存在,但我不记得了。希望这有帮助!
You might find what you need here, I found it on the fly: MyGeneration.
I know there are others that exist, but I don'T remember by heart. Hope this helps!