We now avoid a type reference to XmlBeamHttpMessageConverter in a field within SpringDataWebConfiguration to avoid a type reference to a potentially unresolvable type. This seems to have caused issues on certain JDK 14 builds [0].
[0] https://github.com/spring-projects/spring-framework/issues/25050
Reorder constructor filtering with the goal to delay/avoid potentially expensive PersistenceConstructor creation with parameter lookup as much as possible.
The lookup is (in a default setup) only done once per domain type, but depending on the number of entities to inspect the change can help save some cycles for larger domains.
Before:
Benchmark Mode Cnt Score Error Units
EntityMetadataBenchmark.alwaysNew thrpt 10 224318,163 ± 42542,453 ops/s
After:
Benchmark Mode Cnt Score Error Units
EtityMetadataBenchmark.alwaysNew thrpt 10 420053,505 ± 9288,093 ops/s
public class DomainType {
private String id;
private @Id String theId;
private String firstname, lastname;
private Integer age;
public DomainType(String id, String theId, String firstname, String lastname, Integer age) {
this.id = id;
this.theId = theId;
this.firstname = firstname;
this.lastname = lastname;
this.age = age;
}
@PersistenceConstructor
public DomainType(String firstname, String lastname) {
this.firstname = firstname;
this.lastname = lastname;
}
}
Original pull request: #440.
Delete by Flow is now suspended as the delete method completion is driven by the given Flow. To allow for synchronization, this method is suspended and awaits completion.
We now detect whether callbacks are present before we create result lists instead of always allocating a Collection. CallbackRetriever now also returns a cached variant of its list of callbacks instead of always allocating a new ArrayList.
Kotlin coroutine methods are compiled returning Object so the original return type gets lost. We resolve the return type from the Continuation parameter that synthetized as last parameter in a coroutine method declaration.
We now use the correct quotation map that is based on the rewritten SpEL query to detect whether an expression was quoted.
Previously, we used the quotation map from the original query.
After augmenting the query with synthetic parameters, the quotation offset no longer matched the query that ß∑was under inspection and calls to SpelExtractor.isQuoted(…) could report an improper result.
Original pull request: #434.
We now pick up case-insensitive sorting flags by parsing it up from a sort query string argument.
To enable ignore case for one or more properties, we expect "ignorecase" as last element in a sort spec. Sort order and case-sensitivity options are parsed case-insensitive for a greater flexibility:
http://localhost/?sort=firstname,IgnoreCase or http://localhost/?sort=firstname,ASC,ignorecase
Original pull request: #172.
Converting from instant to ZoneDateTime and back to Instant does not seem to have a purpose as the timezone information will never be used
Original pull request: #260.
Joda-Time and ThreeTenBackport converters are now deprecated in favor of JSR-310 (java.time) support. These converters are now in maintenance mode without receiving future enhancements.
Replace list creation with constant. Replace ConverterConfiguration.skipFor list with Predicate for flexible conditions. Fix typo. Simplify conditionals.
Original pull request: #421.
CustomConversions now registers all given user defined converters and selects only those converters from the StoreConversions that convert to or from a store supported simple type.
By doing so we make sure to only register supported converters which removes warning messages from the log and reduces the number of converters within the ConversionService.
Original pull request: #421.
We now expose a dedicated PersistentPropertyPathAccessor and optionally take options for both the read and write access to properties. On read, clients can define to eagerly receive null in case one of the path segments is null. By default, we reject those as it indicates that there might be an issue with the backing object if the client assumes it can look up the more deeply nested path to receive a result.
On write access clients can define to either reject, skip or log intermediate null segments where skip means, that the setting is just silently aborted. Clients can also control how to deal with collection and map intermediates. By default we now propagate the attempt to set a value to all collection or map items respectively. This could be potentially extended to provide a filter receiving both the property and property value to selectively propagate those calls in the future.
The separation of these APIs (PersistentPropertyAccessor and PersistentPropertyPathAccessor) is introduced as the latter can be implemented on top of the former and the former potentially being dynamically generated. The logic of the latter can then be clearly separated from the actual individual property lookup. ConvertingPropertyAccessor is now a PersistentPropertyPathAccessor, too, and overrides SimplePersistentPropertyPathAccessor.getTypedProperty(…) to plug in conversion logic. This allows custom collection types being used if the ConversionService backing the accessor can convert from and to Collection or Map respectively.
Deprecated all PersistentPropertyPath-related methods on PersistentPropertyAccessor for removal in 2.3.
MappingAuditableBeanWrapperFactory now uses these new settings to skip both null values as well as collection and map values when setting auditing metadata.
Related tickets: DATACMNS-1438, DATACMNS-1461, DATACMNS-1609.
To retain backwards compatibility for the legacy EntityInstantiators API, we now adapt the map values for custom instantiators that are handed into the constructors of EntityInstantiators.