40 lines
911 B
Plaintext
40 lines
911 B
Plaintext
The use of any value but ``++"validate"++`` for ``++hibernate.hbm2ddl.auto++`` may cause the database schema used by your application to be changed, dropped, or cleaned of all data. In short, the use of this property is risky, and should only be used in production with the ``++"validate"++`` option, if it is used at all.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
<session-factory>
|
|
<property name="hibernate.hbm2ddl.auto">update</property> <!-- Noncompliant -->
|
|
</session-factory>
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
<session-factory>
|
|
<property name="hibernate.hbm2ddl.auto">validate</property> <!-- Compliant -->
|
|
</session-factory>
|
|
----
|
|
or
|
|
|
|
----
|
|
<session-factory>
|
|
<!-- Property deleted -->
|
|
</session-factory>
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|