In oder to preserve contextual information the PersistentPropertyPathFactory now obtains EntityInformation for properties from the MappingContext via their PersistentProperty representation instead of plain the TypeInformation as the former contains more information about the actual type and signatures.
Closes#2293.
Original pull request: #2294.
We now guard Slice conversion against potential ClassCastException using the proper condition grouping. Previously, the conversion could happen if the query is a slice query while the source was not a Slice.
Resolves#2296.
We now consider default Querydsl bindings when registering a DefaultQuerydslBinderCustomizer bean. The default bindings are applied before applying type-specific bindings.
Closes#206.
Original Pull Request: #2292
Do not include the result value in the exception message to avoid data exposure.
Improve data flow to avoid superfluous null checks.
See #2290.
Original Pull Request: #2291.
We now throw UnsupportedOperationException when a projected value cannot be returned because it cannot be brought into the target type, either via conversion or projection.
This exception improves the error message by avoiding throwing IllegalArgumentException: Projection type must be an interface from the last branch that falls back into projections.
Closes#2290.
Original Pull Request: #2291
Mention that even when only using the CreatedDate & LastModifiedDate annotations it is mandatory to enable auditing.
Add sample of using auditing metadata within an embedded entity.
Closes#2283
Original pull request: #2285
We now cache the negative outcome of PreferredConstructor.isConstructorParameter(…) to avoid iterations and iterator allocations which roughly improves typical converter usage by roughly 32%.
Before:
Benchmark Mode Cnt Score Error Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField thrpt 10 6848447,474 ± 554354,377 ops/s
After
Benchmark Mode Cnt Score Error Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField thrpt 10 9071099,879 ± 1423166,087 ops/s
Closes#2295.
We recommend to not use ChainedTransactionManager as it emulates distributed transactions without providing consistency guarantees that can end up in partially committed transactions. To attach to commit/rollback operations we recommend registering TransactionSynchronization instead.
Closes#2232
Original Pull Request: #2286
Introduce factory methods on Pageable, PageRequest, and QPageRequest to construct PageRequest objects. Replace builder with with…(…) methods.
Closes#322.
We now support PageRequest creation through PageRequest.ofSize(10).withPage(1).withSort(Direction.DESC, "foo"). Simplified Pageable instances can be created through Pageable.ofSize(10).withPage(1).
Closes#322.
Attach repository interface name to each repository init event.
Make spring.data.repository.postprocessors conditional to reduce the number of events. Append full fragment diagnostics.
Reorder methods, add author tag, reformat code.
Closes#2247.
Original pull request: #2273.
This commit adds support for collecting data repository startup metric (repository scanning, repository initialization) using core framework ApplicationStartup and StartupStep.
Collected metrics can be stored with Java Flight Recorder when using a FlightRecorderApplicationStartup.
Closes#2247.
Original pull request: #2273.
Also, tweak test case to avoid to refer to a field in a Spring class but rather use API to access the value. Changes in Spring Framework 5.3.4 require this as the internal structure of AbstractJackson2HttpMessageConverter changed to support custom ObjectMapper instances per type and media type.
Fixes GH-2284.
We now avoid the pre-computation of the base URI in PagedResourceAssemblerArgumentResolver as the actual assembler will fall back to using the URI of the current request by default anyway. The latter makes sure that request parameters, that are contained in the original requests appear in links created. If a controller wants to deviate from that behavior, they can create a dedicated link themselves and hand that to the assembler explicitly.
Fixes GH-2173, GH-452.
We now assign the repository field before resolving the persistent entity through the mapping context to avoid a potential NPE caused by a getObject(…) invocation through an application event.
Closes#2068
Introduce constructors accepting non-null ConversionService, handle conversion service defaulting in configuration classes by using ObjectProvider. Extract common code to create a predicate in getPredicate(…) method. Add unit test.
Convert spaces to tabs.
Related ticket: #2200.
Original pull request: #2274.
We now provide ReactiveQuerydslPredicateArgumentResolver to resolve Querydsl Predicates when using Spring WebFlux.
Related ticket: #2200.
Original pull request: #2274.
We now leniently skip parameter name resolution for types using unsigned types. The issue is caused by Kotlin's DefaultConstructorMarker that doesn't report a parameter name.
Closes#2215
We now check for double-nesting of JSON path evaluation results when the return type is a collection. If the result is double-wrapped and the nested object is a collection then we unwrap it.
Closes#2270
We now provide a KProperty extension leveraging KProperty references to express a property path. Using Kotlin property references (such as Author::name that translates to `book` or Book::author / Author.name translating to `book.author`) is refactoring-safe as the property expressions are part of the Kotlin language. We render KPropertyPath using the same semantics as our PropertyPath so that store-specific modules can leverage either property paths or accept KProperty directly.
In contrast to the previous implementation, KPropertyPath is private and the rendering function was renamed to toDotPath to align with PropertyPath.toDotPath.
Related ticket: DATAMONGO-2138 (spring-projects/spring-data-mongodb#3515)
Original Pull Request: #478Closes: #2250