Commit Graph

1660 Commits

Author SHA1 Message Date
Michael Simons
af033a0ead Remove remark about AbstractAuditable.
This class only exists in Spring Data JPA, not in Commons.

Closes #2437
2021-09-07 09:15:34 +02:00
Mark Paluch
b47069ea96 Remove tests that check for absence of parameter names.
Closes #2444
2021-09-07 09:09:28 +02:00
Oliver Drotbohm
532ba9556b Avoid reflection in SpringDataWebConfiguration.
We now use an explicit lookup via the application context to consume PageableHandlerMethodArgumentResolverCustomizer and SortHandlerMethodArgumentResolverCustomizer rather than autowiring those into a field.

Fixes #2440.
2021-08-26 16:13:58 +02:00
Jens Schauder
e68a2a6ad8 Prepare 2.5.4 (2021.0.4).
See #2414
2021-08-12 11:22:25 +02:00
Oliver Drotbohm
344aab7944 StreamUtils.zip(…) now treats infinite streams correctly.
When an infinite Stream was handed into StreamUtils.zip(…) as first argument, the resulting stream was infinite, too, while inverting the argument order was limiting the resulting stream to the length of the finite one. This is now fixed by actually evaluating whether we can advance on both of the streams and shortcutting the process if that is not possible on either of the streams, limiting the processing of the overall Stream to the shorter of the two as already advertised in the Javadoc.

Fixes #2426.
2021-08-09 17:04:24 +02:00
Mark Paluch
ef8170844c Remove changelog shipped with the binaries.
Closes #2419
2021-07-22 08:28:46 +02:00
Mark Paluch
8f7a6d30e0 Polishing.
Extract adding the actual entity to the MappingContext into its own method along with error handling spanning the entire entity initialization process.

See #2329
Original pull request: #2367.
2021-07-20 10:19:02 +02:00
Greg L. Turnquist
b05965f2b2 Remove PersistentEntity from MappingContext upon mapping metadata initialization errors.
When an error happens inside the AbstractMappingContext, the caching sometimes gets corrupted. That's because some exceptions are caught, others are not. Instead, the error handling that clears out the cache needs to be shifted up one level, resulting in a simpler code block.

Closes #2329
Original pull request: #2367.
2021-07-20 10:19:02 +02:00
Jens Schauder
4f3ee7ec0f Prepare 2.5.3 (2021.0.3).
See #2388
2021-07-16 11:34:27 +02:00
Jens Schauder
a17946a0fc Updated changelog.
See #2388
2021-07-16 11:34:23 +02:00
Mark Paluch
b49d1b7117 Polishing.
Un-deprecate constructor. Rearrange method arguments to match parameter significance. Reformat code, replace space indents with tabs.

Original pull request: #2403.
2021-07-13 14:13:51 +02:00
sokomishalov
d1e27b55e2 Accept JsonProvider upon JsonProjectingMethodInterceptorFactory creation.
We now configure explicitly the JsonProvider that is used by JSONPath through JsonProjectingMethodInterceptorFactory to avoid misconfiguration due to JSONPath defaulting attempts. Accepting JsonProvider allows for improved flexibility during configuration.

Closes #2403
2021-07-13 14:13:51 +02:00
Mark Paluch
9cc467fe59 Refine ClassGeneratingEntityInstantiator deprecation note.
Closes #2400
2021-07-13 10:35:30 +02:00
Yanming Zhou
57a142ce65 Fix outdated ExampleMatcher docs.
Closes #2404
2021-07-13 10:19:02 +02:00
Jens Schauder
1e4203ca2f Corrects the description of constructor detection.
Closes #2401
Original pull request: #2402.
2021-07-13 10:13:16 +02:00
Yanming Zhou
3c5cf34939 Fix code example showing Streamable usage.
Closes #2391
2021-07-12 15:53:55 +02:00
Paul Lin
5ce381e9df Fix broken link to Spring framework reference documentation.
Closes #2381.
2021-07-12 15:51:43 +02:00
Mark Paluch
812b34cdf5 Polishing.
Add unit tests.

See #2392
Original pull request: #2393.
2021-07-12 15:47:30 +02:00
David Becker
90a50d4d82 Fix EvaluationContextExtension filter fall-through in ReactiveExtensionAwareEvaluationContextProvider.
Using JpaEvaluationContextExtension with reactive infrastructure in place, ReactiveExtensionAwareEvaluationContextProvider can lead to IllegalStateException if the desired extension doesn't match the predicate instead of being silently dropped.

Closes #2392
Original pull request: #2393.
2021-07-12 15:47:20 +02:00
Stephane Nicoll
23fbff0054 Polishing.
A public bean method that returns a private type is unusual and prevents the processing of such bean in reflection-free use cases. There was also an unnecessary qualifier in the implementation.

Closes #2399
2021-07-12 15:19:15 +02:00
Mark Paluch
88128e5986 Polishing.
Fix Javadoc formatting. Consistently mention proxy class unwrapping.

Original pull request: #2406.
2021-07-07 14:52:00 +02:00
Oliver Drotbohm
0d92abc603 Repositories now allows lookup of parent repositories for sub-types.
When inheritance is used for aggregates, lookups of the repository for a Child aggregate instance have so far failed to return a repository registered for the Parent. Client code had to consider that scenario explicitly.

This commit introduces an additional lookup step in case we cannot find a repository for an aggregate type immediately. In this case, we then check for assignability of any of the known aggregate types we have registered repositories for and the type requested. I.e. for a request for the repository of Child, a repository, explicitly registered to manage Child instances would still be used. In the sole presence of a repository managing Parent instances, that would be returned for the request for Child, too.

Original pull request: #2406.
2021-07-07 14:45:43 +02:00
Mark Paluch
a01c4597ed Revise QuerydslPredicateBuilder nullability behavior.
We now no longer return a null Predicate from QuerydslPredicateBuilder.getPredicate(…) if the input values are empty or if the constraints are empty. Instead, we return an empty BooleanBuilder instance to avoid null handling on the calling side.

HandlerMethodArgumentsResolvers for QuerydslBindings retain their null/Optional.empty semantics.

Closes #2396
2021-06-29 10:18:59 +02:00
Mark Paluch
6e6b4f9a85 Prepare 2.5.2 (2021.0.2).
See #2376
2021-06-22 15:51:38 +02:00
Mark Paluch
25e55ae777 Updated changelog.
See #2376
2021-06-22 15:51:30 +02:00
Mark Paluch
418fc0cbfb Updated changelog.
See #2375
2021-06-22 15:29:52 +02:00
Mark Paluch
1bdb44bb69 Polishing.
Update placeholder name to reflect its position instead of the content that is being added by using modules.

Closes #2382
2021-06-17 11:59:13 +02:00
Jens Schauder
733e4d8183 Allow for a module specific inclusion for DTO projections.
See https://github.com/spring-projects/spring-data-jpa/issues/2009

See #2382
2021-06-17 11:59:13 +02:00
Mark Paluch
a45873e98a Allow combining Sort and TypedSort using Sort.and(…).
We now retain properly the collection of orders by using accessor methods instead of relying on using the orders field. TypedSort orders are not using the orders field, instead they iterate over recorded persistent property paths.

Closes #2103
Original pull request: #2377.
2021-06-10 15:01:50 +02:00
Mark Paluch
e86480e651 Prepare 2.5.1 (2021.0.1).
See #2355
2021-05-14 12:23:21 +02:00
Mark Paluch
7e91f3358e Updated changelog.
See #2355
2021-05-14 12:23:15 +02:00
Mark Paluch
72fd400c44 Updated changelog.
See #2354
2021-05-14 12:06:39 +02:00
Mark Paluch
a7d9411581 Disable unit tests for Kotlin unsigned integers until IDE support gets fixed.
Closes #2374
2021-05-12 14:58:27 +02:00
Mark Paluch
b5ff1f08b2 Obtain merged annotation for annotation validation.
We now validate declared annotations by pre-processing these through AnnotatedElementUtils to ensure a proper comparison. Previously, we compared annotation in their declared form (AnnotatedElement.getAnnotations()) with merged annotations which could fail due to aliasing effects of merged annotations.

Closes #2368.
2021-05-05 12:05:34 +02:00
Mark Paluch
786ebec6a1 Limit BeanWrapper's KotlinCopyUtil to Kotlin Data classes.
Previously, we tried to invoke the copy(…) method on all Kotlin classes whereas the copy(…) method is only specific to Kotlin data classes.

Original pull request: #390.
Closes #2358.
2021-04-21 09:29:11 +02:00
Mark Paluch
249fa737af Prepare 2.5 GA (2021.0.0).
See #2345
2021-04-14 14:18:21 +02:00
Mark Paluch
ed825ad085 Updated changelog.
See #2345
2021-04-14 14:18:16 +02:00
Mark Paluch
7800344491 Updated changelog.
See #2346
2021-04-14 11:43:30 +02:00
Mark Paluch
b95e41f0cc Updated changelog.
See #2327
2021-04-14 11:17:39 +02:00
Mark Paluch
d6d4d47484 Polishing.
Tweak wording.

Original pull request: #2352.
2021-04-13 15:10:07 +02:00
Jens Schauder
d1a3f107fd Adds a new snippet for is-new-state-detection.
This is intended for inclusion by other modules.

Closes #2352.
2021-04-13 15:09:44 +02:00
Oliver Drotbohm
c643d2d90f AbstractPersistentProperty now considers association target type for ….getPersistentEntityTypes().
Prior to this commit, the lookup of types to be added as persistent entities for a given PersistentProperty used the actual property type which did not consider the association target type at all. Removed the usage of Optional for the entity type information and switched to use TypeInformation for the raw association target type so that it can be considered in ….getActualType().
2021-04-07 15:31:43 +02:00
Mark Paluch
8adfe47efa Improve ClassGeneratingEntityInstantiator error message if the to be instantiated type is abstract.
We now throw MappingInstantiationException with a nested BeanInstantiationException in alignment to ReflectionEntityInstantiator when attempting to create a new instance of an abstract class.

Closes #2348.
2021-04-06 14:15:16 +02:00
Mark Paluch
d27ac79771 Back-off in ResultProcessor if the result object is an instance of the target type.
We now do not attempt to convert the object if it is an instance of the declared target type.

Closes #2347.
2021-04-06 13:39:21 +02:00
Mark Paluch
7464325288 Updated changelog.
See #2328
2021-03-31 18:30:43 +02:00
Mark Paluch
8906e0dfad Prepare 2.5 RC1 (2021.0.0).
See #2303
2021-03-31 17:04:34 +02:00
Mark Paluch
905bdc97f0 Updated changelog.
See #2303
2021-03-31 17:04:30 +02:00
Oliver Drotbohm
23ebf3164f Support for association target type detection for jMolecules.
We now detect the component type of jMolecules' Association as association target type in AbstractPersistentProperty. AnnotationBasedPersistentProperty keeps the lookup of the explicit @Reference around but falls back to the Association analysis for that.

@Reference is now only considered by AnnotationBasedPersistentProperty. It was previously also (erroneously) considered by AbstractPersistentProperty.

It was also changed to return `null` in case no association target type could be looked up instead of returning the sole property's type in case that is an entity. This was done to satisfy the behavior documented on the interface but also to avoid the call to isEntity() during the calculation which might use association information in turn and thus lead to a stack overflow. Reworded the contract of PersistentProperty.getAssociationTargetType() to emphasize the symmetry with ….isAssociation() in implementation classes.

Closes: #2344.
2021-03-31 15:07:25 +02:00
Christoph Strobl
85c0ce1450 Polishing.
Original Pull Request: #2333
2021-03-30 12:06:58 +02:00
Mark Paluch
79ed0a75c7 Support @Value meta-annotations and expose MergedAnnotations on PreferredConstructor parameters.
We now support composed annotation that are annotated with `@Value`. we also expose MergedAnnotations through PreferredConstructor.Parameter for further use by store modules that want to inspect constructor argument annotations.

Closes: #2332
Original Pull Request: #2333
2021-03-30 12:06:03 +02:00