You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/object-mapping.adoc
+4-1
Original file line number
Diff line number
Diff line change
@@ -314,7 +314,7 @@ Consider the following `data` class `Person`:
314
314
data class Person(val id: String, val name: String)
315
315
----
316
316
317
-
The class above compiles to a typical class with an explicit constructor.We can customize this class by adding another constructor and annotate it with `@PersistenceCreator` to indicate a constructor preference:
317
+
The class above compiles to a typical class with an explicit constructor.We can customize this class by adding another constructor and annotate it with `@PersistenceCreator` to indicate a constructor preference:
318
318
319
319
[source,kotlin]
320
320
----
@@ -335,6 +335,9 @@ data class Person(var id: String, val name: String = "unknown")
335
335
336
336
Every time the `name` parameter is either not part of the result or its value is `null`, then the `name` defaults to `unknown`.
337
337
338
+
NOTE: Delegated properties are not supported with Spring Data. The mapping metadata filters delegated properties for Kotlin Data classes.
339
+
In all other cases you can exclude synthetic fields for delegated properties by annotating the property with `@delegate:org.springframework.data.annotation.Transient`.
0 commit comments