【问题标题】:How to create table from Hibernate POJO class ? How to implement reverse enginnering strategies in Hibernate?如何从 Hibernate POJO 类创建表?如何在 Hibernate 中实现逆向工程策略?
【发布时间】:2012-04-20 14:32:52
【问题描述】:

我已经编写了 POJO 类、*.cfg.xml 文件、*.hbm.xml 文件和休眠代码来检索数据。

但我没有创建任何表。 hibernate中是否有任何可用的标签可以使用配置文件创建表。

如何在hibernate中实现逆向工程?

谢谢!

【问题讨论】:

    标签: java hibernate reverse-engineering


    【解决方案1】:

    您实际上可以设置配置属性并指示 hibernate 为您创建数据库架构。

    hibernate.hbm2ddl.auto = create-drop | update
    

    查看此链接Asking hibernate to generate schema for you

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-03
      • 1970-01-01
      • 2012-01-15
      • 1970-01-01
      • 2017-06-23
      • 2012-03-15
      • 2014-11-24
      • 2016-06-18
      相关资源
      最近更新 更多