From a1ea323370098ee682fb078e1de17e14b803229e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 9 Dec 2022 08:56:52 +0100 Subject: [PATCH] Fix wording in reference documentation. Closes #2749 --- src/main/asciidoc/object-mapping.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/asciidoc/object-mapping.adoc b/src/main/asciidoc/object-mapping.adoc index e2582b38b..c2213c3ac 100644 --- a/src/main/asciidoc/object-mapping.adoc +++ b/src/main/asciidoc/object-mapping.adoc @@ -203,8 +203,8 @@ The wither method is optional as the persistence constructor (see 6) is effectiv <3> The `age` property is an immutable but derived one from the `birthday` property. With the design shown, the database value will trump the defaulting as Spring Data uses the only declared constructor. Even if the intent is that the calculation should be preferred, it's important that this constructor also takes `age` as parameter (to potentially ignore it) as otherwise the property population step will attempt to set the age field and fail due to it being immutable and no `with…` method being present. -<4> The `comment` property is mutable is populated by setting its field directly. -<5> The `remarks` properties are mutable and populated by setting the `comment` field directly or by invoking the setter method for +<4> The `comment` property is mutable and is populated by setting its field directly. +<5> The `remarks` property is mutable and is populated by invoking the setter method. <6> The class exposes a factory method and a constructor for object creation. The core idea here is to use factory methods instead of additional constructors to avoid the need for constructor disambiguation through `@PersistenceCreator`. Instead, defaulting of properties is handled within the factory method.