From 4ff7268619eadb2f4efc8fc49c6c67d786a0ed62 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sat, 29 Apr 2023 17:00:25 +0100 Subject: [PATCH] docs: describe key-value template Signed-off-by: Otavio Santana --- .../main/asciidoc/chapters/mapping/template_key_value.adoc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/src/main/asciidoc/chapters/mapping/template_key_value.adoc b/spec/src/main/asciidoc/chapters/mapping/template_key_value.adoc index b6cfd5d12..bf72e5640 100644 --- a/spec/src/main/asciidoc/chapters/mapping/template_key_value.adoc +++ b/spec/src/main/asciidoc/chapters/mapping/template_key_value.adoc @@ -14,9 +14,7 @@ ==== Key-Value Template -This template has the responsibility to serve as the persistence of an entity in a key-value database. - -The `KeyValueTemplate` is the template for synchronous tasks. +The `KeyValueTemplate` is a specialization of `Template` to work with Key-value databases. Remember that this kind of database primarily works with the key. Thus, the select method from the Template might return `UnsupportedOperationException`. [source,java] ---- @@ -39,7 +37,7 @@ Iterable usersFound = template.get(Collections.singletonList("ada"), Per WARNING: In key-value templates, both the `@Entity` and `@Id` annotations are required. The `@Id` identifies the key, and the whole entity will be the value. The API won't cover how the value persists this entity. -To use a key-value template, just follow the CDI style and precede the field with the `@Inject` annotation. + [source,java] ----