Hibernate hbm2ddl.auto,可能的值,以及它们的功能 [英] Hibernate hbm2ddl.auto, possible values, and what they do
问题描述
我在查看Hibernate hbm2ddl.auto
配置属性及其可能的值:
验证
更新
create
create-drop
所有这些值是做什么的? Hibernate参考文档只会简要地谈及 create-drop
,但不会说其他任何值:
hibernate.hbm2ddl.auto
自动验证或将架构DDL导出到数据库时会创建
SessionFactory
。使用create-drop
,当SessionFactory
明确关闭时,数据库模式将被删除。
eg
validate
|更新
|创建
|create-drop
我发现非常有用这些堆栈溢出问题的解释: 但官方文档中仍然没有。 您提供的链接已经是官方文档。所以,今天没有什么更正式和全面的。 所以我想你的问题的答案是双重的: 我知道这不是你梦寐以求的完美答案,但这实际上就是你今天所拥有的全部。 但好消息是,项目是开源的,所以你需要帮助完善它: - )。 I am looking at the Hibernate What do all these values do? The Hibernate Reference Documentation only talks briefly about Automatically validates or exports schema DDL to the database when the e.g. I found very useful explanations in these Stack Overflow questions: But still nothing in the official documentation. The link you provided is already the official documentation. So, there's nothing more official and comprehensive as-of today. So I guess the answer to your question is two-fold: I know this isn't the perfect answer you dreamt about, but this is actually all you have today. But the good news is that the project is open-source, so you have all you need to help improve it :-). 这篇关于Hibernate hbm2ddl.auto,可能的值,以及它们的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
hbm2ddl.auto
configuration property and its possible values:
validate
update
create
create-drop
create-drop
, but doesn't say anything about the other values:
hibernate.hbm2ddl.auto
SessionFactory
is created. With create-drop
, the database schema will be dropped when the SessionFactory
is closed explicitly.validate
| update
| create
| create-drop