From ecc9f3fd607941c8113a3668d62c01e9f0e54d29 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 27 Jan 2020 08:50:56 +0100 Subject: [PATCH] DATAMONGO-2457 - Fix id type explanation in repository documentation. Original pull request: #829. --- src/main/asciidoc/reference/mongo-repositories.adoc | 5 ++++- src/main/asciidoc/reference/reactive-mongo-repositories.adoc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/asciidoc/reference/mongo-repositories.adoc b/src/main/asciidoc/reference/mongo-repositories.adoc index 00f1493b6..d7a2e01a4 100644 --- a/src/main/asciidoc/reference/mongo-repositories.adoc +++ b/src/main/asciidoc/reference/mongo-repositories.adoc @@ -28,7 +28,10 @@ public class Person { ---- ==== -Note that the domain type shown in the preceding example has a property named `id` of type `ObjectId`. The default serialization mechanism used in `MongoTemplate` (which backs the repository support) regards properties named `id` as the document ID. Currently, we support `String`, `ObjectId`, and `BigInteger` as ID types. Now that we have a domain object, we can define an interface that uses it, as follows: +Note that the domain type shown in the preceding example has a property named `id` of type `String`. The default serialization mechanism used in `MongoTemplate` (which backs the repository support) regards properties named `id` as the document ID. Currently, we support `String`, `ObjectId`, and `BigInteger` as ID types. +Please see <> for more information about on how the `id` field is handled in the mapping layer. + +Now that we have a domain object, we can define an interface that uses it, as follows: .Basic repository interface to persist Person entities ==== diff --git a/src/main/asciidoc/reference/reactive-mongo-repositories.adoc b/src/main/asciidoc/reference/reactive-mongo-repositories.adoc index 8ff6737d6..bef322a88 100644 --- a/src/main/asciidoc/reference/reactive-mongo-repositories.adoc +++ b/src/main/asciidoc/reference/reactive-mongo-repositories.adoc @@ -41,7 +41,10 @@ public class Person { ---- ==== -Note that the entity defined in the preceding example has a property named `id` of type `ObjectId`. The default serialization mechanism used in `MongoTemplate` (which backs the repository support) regards properties named `id` as the document ID. Currently, we support `String`, `ObjectId`, and `BigInteger` as id-types. The following example shows how to create an interface that defines queries against the `Person` object from the preceding example: +Note that the entity defined in the preceding example has a property named `id` of type `String`. The default serialization mechanism used in `MongoTemplate` (which backs the repository support) regards properties named `id` as the document ID. Currently, we support `String`, `ObjectId`, and `BigInteger` as id-types. +Please see <> for more information about on how the `id` field is handled in the mapping layer. + +The following example shows how to create an interface that defines queries against the `Person` object from the preceding example: .Basic repository interface to persist Person entities ====