Skip to content

Commit 14d76ab

Browse files
committed
Fix wording in reference documentation.
Closes #2749
1 parent eee3239 commit 14d76ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/asciidoc/object-mapping.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ The wither method is optional as the persistence constructor (see 6) is effectiv
203203
<3> The `age` property is an immutable but derived one from the `birthday` property.
204204
With the design shown, the database value will trump the defaulting as Spring Data uses the only declared constructor.
205205
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.
206-
<4> The `comment` property is mutable is populated by setting its field directly.
207-
<5> The `remarks` properties are mutable and populated by setting the `comment` field directly or by invoking the setter method for
206+
<4> The `comment` property is mutable and is populated by setting its field directly.
207+
<5> The `remarks` property is mutable and is populated by invoking the setter method.
208208
<6> The class exposes a factory method and a constructor for object creation.
209209
The core idea here is to use factory methods instead of additional constructors to avoid the need for constructor disambiguation through `@PersistenceCreator`.
210210
Instead, defaulting of properties is handled within the factory method.

0 commit comments

Comments
 (0)