Hibernate 注释主要针对持久化元数据。该项目还与一些外部模块进行了很好的集成。
Default
组在实体插入和更新时经过验证,数据库模型也会根据 Default
组进行相应更新。
您可以通过将属性设置为 callback, dll
同时使用 callback
和 ddl
<persistence ...>
<persistence-unit ...>
...
<properties>
<property name="javax.persistence.validation.mode"
value="callback, ddl"/>
</properties>
</persistence-unit>
</persistence>
您可以在 hibernate.cfg.xml
、hibernate.properties
或以编程方式中设置这些属性。
版权所有 © 2004 Red Hat Inc. 和各种作者