Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate User Guide Locking chapter extras to test folder and old xml …
…mapping to the Legacy appendix
- Loading branch information
1 parent
f8e7799
commit aeac516
Showing
15 changed files
with
206 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
documentation/src/main/asciidoc/userguide/appendices/Legacy_DomainModel.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[[appendix-legacy-domain-model]] | ||
== Legacy Domain Model | ||
:sourcedir: extras | ||
|
||
.Declaring a version property in `hbm.xml` | ||
==== | ||
[source,xml] | ||
---- | ||
include::{sourcedir}/version_property.xml[] | ||
---- | ||
==== | ||
|
||
[cols=",",] | ||
|======================================================================= | ||
|column |The name of the column holding the version number. Optional, defaults to the property name. | ||
|name |The name of a property of the persistent class. | ||
|type |The type of the version number. Optional, defaults to `integer`. | ||
|access |Hibernate's strategy for accessing the property value. Optional, defaults to `property`. | ||
|unsaved-value |Indicates that an instance is newly instantiated and thus unsaved. | ||
This distinguishes it from detached instances that were saved or loaded in a previous session. | ||
The default value, `undefined`, indicates that the identifier property value should be used. Optional. | ||
|generated |Indicates that the version property value is generated by the database. Optional, defaults to `never`. | ||
|insert |Whether or not to include the `version` column in SQL `insert` statements. | ||
Defaults to `true`, but you can set it to `false` if the database column is defined with a default value of `0`. | ||
|======================================================================= | ||
|
||
.The timestamp element in `hbm.xml` | ||
==== | ||
[source,xml] | ||
---- | ||
include::{sourcedir}/timestamp_version.xml[] | ||
---- | ||
==== | ||
|
||
[cols=",",] | ||
|======================================================================= | ||
|column |The name of the column which holds the timestamp. Optional, defaults to the property name | ||
|name |The name of a JavaBeans style property of Java type `Date` or `Timestamp` of the persistent class. | ||
|access |The strategy Hibernate uses to access the property value. Optional, defaults to `property`. | ||
|unsaved-value |A version property which indicates than instance is newly instantiated, and unsaved. | ||
This distinguishes it from detached instances that were saved or loaded in a previous session. | ||
The default value of `undefined` indicates that Hibernate uses the identifier property value. | ||
|source |Whether Hibernate retrieves the timestamp from the database or the current JVM. | ||
Database-based timestamps incur an overhead because Hibernate needs to query the database each time to determine the incremental next value. | ||
However, database-derived timestamps are safer to use in a clustered environment. | ||
Not all database dialects are known to support the retrieval of the database's current timestamp. | ||
Others may also be unsafe for locking, because of lack of precision. | ||
|generated |Whether the timestamp property value is generated by the database. Optional, defaults to `never`. | ||
|======================================================================= |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
documentation/src/main/asciidoc/userguide/chapters/locking/extras/timestamp_version.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
documentation/src/main/asciidoc/userguide/chapters/locking/extras/updating_version.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
documentation/src/main/asciidoc/userguide/chapters/locking/extras/version_annotation.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.