hibernate.hbm2ddl.auto

validate               加載hibernate時,驗證創建數據庫表結構

create                  每次加載hibernate,重新創建數據庫表結構,這就是導致數據庫表數據丟失的原因。
create-drop        加載hibernate時創建,退出是刪除表結構
update                 加載hibernate自動更新數據庫結構

 

<property name="hibernate.hbm2ddl.auto" >create</property>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章