@ -314,7 +314,7 @@ Consider the following `data` class `Person`:
@@ -314,7 +314,7 @@ Consider the following `data` class `Person`:
data class Person(val id: String, val name: String)
----
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:
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:
[source,kotlin]
----
@ -335,6 +335,9 @@ data class Person(var id: String, val name: String = "unknown")
@@ -335,6 +335,9 @@ data class Person(var id: String, val name: String = "unknown")
Every time the `name` parameter is either not part of the result or its value is `null`, then the `name` defaults to `unknown`.
NOTE: Delegated properties are not supported with Spring Data. The mapping metadata filters delegated properties for Kotlin Data classes.
In all other cases you can exclude synthetic fields for delegated properties by annotating the property with `@delegate:org.springframework.data.annotation.Transient`.
@ -770,6 +770,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@@ -770,6 +770,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@ -782,7 +783,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@@ -782,7 +783,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@ -800,7 +801,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@@ -800,7 +801,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@ -832,6 +833,26 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@@ -832,6 +833,26 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@ -852,6 +873,41 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@@ -852,6 +873,41 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
@ -29,6 +29,13 @@ data class ExtendedDataClassKt(val id: Long, val name: String) {
@@ -29,6 +29,13 @@ data class ExtendedDataClassKt(val id: Long, val name: String) {