从hbm文件生成带注释的java类 [英] generate annotated java class from hbm file

查看:189
本文介绍了从hbm文件生成带注释的java类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



是否有可能使用这些hbm文件生成带有注释的java类?

我有一个旧项目,其中的java类是从hbm文件生成的。 / h> 我不认为您可以直接从hbm注释到,但


  1. 从您的hbm配置生成数据库模式。

  2. 使用 Hibernate reverse engeneering 您可以查看这些链接以获取更多信息



  3. I have an old project in which java classes are generated from hbm files.

    Is it possible ,using these hbm files, to generate java classes with annotations?

    解决方案

    I don't think you can do it directly from hbm to annotations, but it's possible to do it if you proceed like this:

    1. Generate the database schema from your hbm configuration.
    2. Use Hibernate reverse engeneering to generate annotated classes from this database.

    You may take a look at these links for further information:

    这篇关于从hbm文件生成带注释的java类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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