rspec/rules/S3822/xml/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

53 lines
1.0 KiB
Plaintext

== Why is this an issue?
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
[source,xml]
----
<session-factory>
<property name="hibernate.hbm2ddl.auto">update</property> <!-- Noncompliant -->
</session-factory>
----
=== Compliant solution
[source,xml]
----
<session-factory>
<property name="hibernate.hbm2ddl.auto">validate</property> <!-- Compliant -->
</session-factory>
----
or
[source,xml]
----
<session-factory>
<!-- Property deleted -->
</session-factory>
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Use "validate" or remove this property.
=== Highlighting
primary: bad value
2ndary: ``++hibernate.hbm2ddl.auto++``
endif::env-github,rspecator-view[]