We now use a dedicated GetOptions instance for the lookup of the parent path in case SetOptions is defined to skip nulls so that the lookup does not fail if the parent path contains a null value.
kotlin.Unit is now considered a simple type to avoid PersistentEntity creation.
ReflectionUtils.isVoid(…) now encapsulates the check so that calling code doesn't need to check if Kotlin is on the class path.
We now invoke BeanNameGenerator directly without additional indirections. Previously, SpringDataAnnotationBeanNameGenerator was calling BeanNameGenerator using null for BeanDefinitionRegistry which caused downstream null dereference.
We now reuse the new bean in InstantiationAwarePropertyAccessor when setting properties. Previously, we used the initial bean state as the bean was held by a delegate PersistentPropertyAccessor which caused only the last set property to be visible.
Always fall back to reflection when the system property for org.graalvm.nativeimage.imagecode is set.
This is required because on the fly code generation is not supported in this case.
Original pull request: #456.
Check for deferred types in ReactiveWrappers so that ReactiveWrapperConverters remains untouched as wrapper conversion from a reactive type into CompletableFuture is still possible from a ReactiveWrapperConverters perspective.
Original pull request: #450.
CompletableFuture use is permitted in imperative repositories so we should not use CompletableFuture as indicator to switch a repository implementation to a reactive one.
Original pull request: #450.
We now avoid identifier conversion in ReflectionrepositoryConverter if not necessary. Reestablish a couple of unit tests for DomainClassConverter that were disabled by accident.
Made the reference to RepositoryInformation non-nullable from the RepositoryAnnotationTransactionAttributeSource (previously RepositoryInformationPreferring…). Adapted test cases accordingly.
We now no longer duplicate Spring Framework code as AbstractFallbackTransactionAttributeSource exposes computeTransactionAttribute which we can use to override to determine TransactionAttribute from the repository interface.
Renamed CustomAnnotationTransactionAttributeSource to RepositoryInformationPreferringAnnotationTransactionAttributeSource to reflect the nature of our customization.
We now eagerly register DomainClassConverter as converter with the ConversionService in the web setup. We also refrain from explicitly registering the traget converters with the ConversionService as that might trigger a ConcurrentModificationException if called during an iteration over the converters in the first place. As DomainClassConverter registers itself for all ConvertiblePairs and delegates to the individual converters anyway.
We now expose RepositoryMetadata.getReturnType(…) to obtain the declared method return type. While pure Java code can rely on Method.getReturnType(), suspended Kotlin methods (Coroutines) require additional lookups. This is because the Kotlin compiler messes around with the return type in the bytecode. It changes the return type to java.lang.Object while synthesizing an additional method argument:
interface MyCoroutineRepository : Repository<Person, String> {
suspend fun suspendedQueryMethod(): Flow<Person>
}
compiles to
interface MyCoroutineRepository extends Repository<Person, String> {
Object suspendedQueryMethod(Continuation<Flow<Person>> arg0);
}
Therefore, the triviality of obtaining a return type becomes an inspection of the actual method arguments.
Related ticket: https://jira.spring.io/browse/DATAMONGO-2562
DomainClassConverter now delays the initialization of the Repositories instances used to avoid the premature initialization of repository instances as that can cause deadlocks if the infrastructure backing the repositories is initialized on a separate thread.
Refactored nested converter classes to allow them to be static ones.
Related issues: spring-projects/spring-boot#16230, spring-projects/spring-framework#25131.
Original pull request: #445.