命令行相当于Hibernate工具中的反向工程? [英] commandline equivalent to reverse engineering in Hibernate tools?

查看:125
本文介绍了命令行相当于Hibernate工具中的反向工程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种相对简单的方法来从命令行反向工程数据库,并基于数据库生成Hibernate工件?我已经能够找到这样做的唯一信息,需要用Hibernate工具跳过大量的工作,这些工具不是为命令行设计的,并且是ant构建文件的。

h2_lin>解决方案

您是否正在尝试将其作为构建过程的一部分?别。数据库逆向工程旨在为您提供构建映射的基础(模板,你有什么) - 而不是生产就绪的映射集合。



正是出于这个原因,反向模式工程工具没有作为Ant任务公开。



如果您宁愿避免使用eclipse并使用命令行将数据库反向工程一个起点见此链接


Is there a relatively simple way to reverse engineer a database from the command line and generate Hibernate artifacts based on the database? the only info I've been able to find on doing this requires jumping through lots of hoops with Hibernate tools that weren't designed for command line use, and ant build files.

解决方案

Are you trying to do this as part of build process? Don't. DB reverse engineering is designed to provide you with a base (template, what have you) to build your mappings on - not with production-ready set of mappings to work with.

It's precisely for that reason that reverse schema engineering tool is not exposed as Ant task.

If you would rather avoid eclipse and use the command line to reverse engineer a database as a starting point see this link

这篇关于命令行相当于Hibernate工具中的反向工程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆