DATAJDBC-111 - Polishing.

Formatting.
Removed some redundant tests.
Some code simplifications.

Original pull request: #110.
This commit is contained in:
Jens Schauder
2019-01-24 11:25:38 +01:00
parent 7a26385b5a
commit 13cc4f6dd6
29 changed files with 228 additions and 730 deletions

View File

@@ -124,7 +124,8 @@ The properties of the following types are currently supported:
It is optional for one-to-one relationship entities to have an `id` attribute.
The table of the referenced entity is expected to have an additional column named the same as the table of the referencing entity.
You can change this name by implementing `NamingStrategy.getReverseColumnName(RelationalPersistentProperty property)`.
Embedded entities do not have an `id`.
Embedded entities do not need an `id`.
If one is present it gets ignored.
* `Set<some entity>` is considered a one-to-many relationship.
The table of the referenced entity is expected to have an additional column named the same as the table of the referencing entity.
@@ -273,7 +274,7 @@ public class MySubEntity {
====
[[jdbc.entity-persistence.embedded-entities]]
=== `Embedded entities`
=== Embedded entities
Embedded entities are used to have value objects in your java data model, even if there is only one table in your database.
In the following example you see, that `MyEntity` is mapped with the `@Embedded` annotation.
@@ -299,7 +300,6 @@ public class EmbeddedEntity {
If you need a value object multiple times in an entity, this can be achieved with the optional `value` element of the `@Embedded` annotation.
This element represents a prefix and is prepend for each column name in the embedded object.
[[jdbc.entity-persistence.state-detection-strategies]]
=== Entity State Detection Strategies