Add support for factory methods.

R2DBC now supports the use of factory methods for entity creation.
Spring Data JDBC already does so via f326897950

Simply annotate a static factory method on your entity class with `@PersistenceCreator`.

Closes #1346
See https://github.com/spring-projects/spring-data-commons/issues/2476
See f326897950
This commit is contained in:
Jens Schauder
2022-10-05 11:50:49 +02:00
parent d1890e3b69
commit ea00369f07
2 changed files with 2 additions and 8 deletions

View File

@@ -37,7 +37,6 @@ import org.springframework.data.mapping.InstanceCreatorMetadata;
import org.springframework.data.mapping.Parameter;
import org.springframework.data.mapping.PersistentPropertyAccessor;
import org.springframework.data.mapping.PersistentPropertyPath;
import org.springframework.data.mapping.PreferredConstructor;
import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mapping.model.DefaultSpELExpressionEvaluator;
import org.springframework.data.mapping.model.ParameterValueProvider;
@@ -52,7 +51,6 @@ import org.springframework.data.relational.core.mapping.RelationalPersistentEnti
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
import org.springframework.data.relational.core.sql.IdentifierProcessing;
import org.springframework.data.util.TypeInformation;
import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;