What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they do

前端 未结 13 2912
轮回少年
轮回少年 2020-11-21 04:47

I really want to know more about the update, export and the values that could be given to hibernate.hbm2ddl.auto
I need to know when to use the update and w

13条回答
  •  情书的邮戳
    2020-11-21 05:31

    If you don't want to use Strings in your app and are looking for predefined constants have a look at org.hibernate.cfg.AvailableSettings class included in the Hibernate JAR, where you'll find a constant for all possible settings. In your case for example:

    /**
     * Auto export/update schema using hbm2ddl tool. Valid values are update,
     * create, create-drop and validate.
     */
    String HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";
    

提交回复
热议问题