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

前端 未结 13 2431
轮回少年
轮回少年 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:38

    hibernate.hbm2ddl.auto automatically validates and exports DDL to the schema when the sessionFactory is created.

    By default, it does not perform any creation or modification automatically on DB. If the user sets one of the below values then it is doing DDL schema changes automatically.

    • create - doing creating a schema

      
      
    • update - updating existing schema

      
      
    • validate - validate existing schema

      
      
    • create-drop - create and drop the schema automatically when a session is starts and ends

      
      

提交回复
热议问题