We now consider the correct argument type instead of checking assignability of the actual property type against the input value.
Closes: #2649
Original Pull Request: #2650
Spring Data Commons has a hard-coded list of special types than can be included in query methods including Pageable and Sort.
A custom finder with PageRequest, even though it extends Pageable, will fail when it would work fine with a narrowed input. This extends the list using an assignability check.
Related: spring-projects/spring-data-jpa#2013
See #2626.
We now support reactive repositories in addition to imperative repositories when populating repositories from a resource reader.
Instead of RepositoryInvokerFactory, we now use a RepositoryPersisterFactory to avoid introducing reactive support to RepositoryInvokerFactory.
We now return a default value for invocations of methods returning a primitive value to pass the AOP infrastructure's check for compatible values. Before, that barked at the null value returned for the invocation.
Fixes#2612.
Removed the removal of the general collection-to-object converter as apparently some downstream Spring Data modules rely on it. This theoretically allows conversions of collections into maps but we now simply don't assume that not to work anymore.
Issue #2619.
Custom collection support is now centralized in ….util.CustomCollections. It exposes API to detect whether a type is a map or collection, identifies the map base type etc.
Support for different collection implementations is externalized via the CustomCollectionRegistrar SPI that allows to define implementations via spring.factories. The current support for Vavr collections has been moved into an implementation of that, VavrCollections.
Unit tests for custom collection handling and conversion previously living in QueryExecutionConverterUnitTests have been moved into CustomCollectionsUnitTests.
Fixes#2619.
Rename generics from C extends PersistentProperty to P extends PersistentProperty.
Refine conversion setup. Make PropertyValueConversions.getValueConverter(…) to return non-null. Return PropertyValueConversions from CustomConversions.
Resolves#2577Closes#2592
PropertyValueConverter read and write methods are never called with null values. Instead, PropertyValueConverter now defines readNull and writeNull to encapsulate null conversion. PropertyValueConversionService is a facade that encapsulates these details to simplify converter usage.
Resolves#2577Closes#2592