Skip to content

Commit 8d6a98a

Browse files
committed
Added missing annotations in the annotation overview
1 parent 03a4362 commit 8d6a98a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/antora/modules/ROOT/partials/mapping-annotations.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
The `RelationalConverter` can use metadata to drive the mapping of objects to rows.
22
The following annotations are available:
33

4-
* `@Id`: Applied at the field level to mark the primary key.
4+
* `@Embedded`: an entity with this annotation will be mapped to the table of the parent entity, instead of a separate table. Allows to specify if the resulting columns should have a common prefix.
5+
If all columns resulting from such an entity are `null` either the annotated entity will be `null` or _empty_, i.e. all of its properties will be `null`, depending on the value of `@Embedded.onEmpty()`
6+
May be combined with `@Id` to form a composite id.
7+
* `@Id`: Applied at the field level to mark the primary key. It may be combined with `@Embedded` to form a composite id.
8+
* `@InsertOnlyProperty`: Marks a property as only to be written during insert. Such a property on an aggregate root will only be written once and never updated. Note that on a nested entity, all save operations result in an insert therefore this annotation has no effect on properties of nested entities.
9+
* `@MappedCollection`: Allows for configuration how a collection, or a single nested entity gets mapped. `idColumn` specifies the column used for referencing the parent entities primary key. `keyColumn` specifies the column used to store the index of a `List` or the key of a `Map`.
10+
* `@Sequence`: specify a database sequence for generating values for the annotated property.
511
* `@Table`: Applied at the class level to indicate this class is a candidate for mapping to the database.
612
You can specify the name of the table where the database is stored.
713
* `@Transient`: By default, all fields are mapped to the row.

0 commit comments

Comments
 (0)