Commit Graph

2406 Commits

Author SHA1 Message Date
sokomishalov
f91901387f 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:11:48 +02:00
Mark Paluch
9ca1c7e157 Refine ClassGeneratingEntityInstantiator deprecation note.
Closes #2400
2021-07-13 10:35:16 +02:00
Yanming Zhou
6c6f1b4014 Fix outdated ExampleMatcher docs.
Closes #2404
2021-07-13 10:19:05 +02:00
Jens Schauder
45e61dfa66 Corrects the description of constructor detection.
Closes #2401
Original pull request: #2402.
2021-07-13 10:12:36 +02:00
Christoph Strobl
b3ae0f7b0b Polishing.
Update documentation to match method signature.

Original Pull Request: #2410
2021-07-13 07:51:06 +02:00
Oliver Drotbohm
d3cd1ab60a Persistent entity type detection now starts with the association target type if available.
This causes us to inspect the most concrete type we can find from a property declaration that might be overridden using an annotation.

Closes: #2409
Original Pull Request: #2410
2021-07-13 07:48:28 +02:00
Oliver Drotbohm
e565c11dcc Consolidate names of methods that provide access to TypeInformation and Class on PersistentProperty.
We now name methods returning a TypeInformation<?> …TypeInformation() and ones that return Class<?> …Type(). In case of both flavors provided, overloads should move to the TypeInformation-based variant as the other one simply resolves ….getType() on the returned value.

Closes: #2408
Original Pull Request: #2410
2021-07-13 07:47:53 +02:00
Yanming Zhou
7e1c3454b3 Fix code example showing Streamable usage.
Closes #2391
2021-07-12 15:53:58 +02:00
Paul Lin
e6bebba7b6 Fix broken link to Spring framework reference documentation.
Closes #2381.
2021-07-12 15:51:21 +02:00
Mark Paluch
6b55a7cb86 Polishing.
Add unit tests.

See #2392
Original pull request: #2393.
2021-07-12 15:47:43 +02:00
David Becker
95e115b357 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:43 +02:00
Mark Paluch
3dcea0296a Adopt to changes in Kotlin Coroutines 1.5.1.
Closes #2411
2021-07-12 15:26:18 +02:00
Stephane Nicoll
8262e21c1a 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:18:35 +02:00
Oliver Drotbohm
b3b590dcf0 Unify entity type detection.
Unified the calculations made for entityTypeInformation and entityTypes in AbstractPersistentProperty. This avoids both calculations getting out of sync. Also we avoid premature calculation abortions if SimpleTypeHolder.isSimpleType(…) returns true for the raw property type. The latter has caused issues for collection properties in Spring Data KeyValue which considers everything in java.util a simple type.

Related ticket: #2390.
2021-07-09 11:10:34 +02:00
Mark Paluch
ab74551928 Polishing.
Reduce TypeDiscoverer.isNullableWrapper method visibility to private to avoid exposure in preparation for wider value type support.

Original pull request: #2394.
See #2390.
2021-07-08 11:49:56 +02:00
Christoph Strobl
3277467b74 Resolve all persistent entities for a persistent property.
Original pull request: #2394.
Closes #2390.
2021-07-08 11:49:36 +02:00
Christoph Strobl
1f77786d89 Don't create PersistentEntity for Nullable wrapper type.
Original pull request: #2394.
Closes #2390.
2021-07-08 11:49:25 +02:00
Mark Paluch
26c2db248b Polishing.
Fix Javadoc formatting. Consistently mention proxy class unwrapping.

Original pull request: #2406.
2021-07-07 14:52:03 +02:00
Oliver Drotbohm
27eac58691 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:44:52 +02:00
Mark Paluch
394187a03b 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:12:34 +02:00
Mark Paluch
847738324f Updated changelog.
See #2376
2021-06-22 16:07:25 +02:00
Mark Paluch
31cd5243f8 Updated changelog.
See #2375
2021-06-22 15:29:50 +02:00
Mark Paluch
fb3e50951e 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:07 +02:00
Jens Schauder
0cd99ce098 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:58:59 +02:00
Mark Paluch
c24ba262ca Polishing.
Use Spring's nullability annotations where used as part of API nullability indicators.

See #2385
2021-06-17 09:03:00 +02:00
Mark Paluch
e57238fe60 Directly import JSR305 jar.
Closes #2385
2021-06-17 08:46:56 +02:00
Mark Paluch
9242b2c7b2 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:53 +02:00
Mark Paluch
f97b4b98ca Updated changelog.
See #2355
2021-05-14 12:36:34 +02:00
Mark Paluch
7175e7bbbd Updated changelog.
See #2354
2021-05-14 12:06:37 +02:00
Greg L. Turnquist
afd262bada Update CI to JDK 16.
See #2334.
2021-05-13 15:37:06 -05:00
Mark Paluch
698cf28410 Disable unit tests for Kotlin unsigned integers until IDE support gets fixed.
Closes #2374
2021-05-12 14:58:04 +02:00
Mark Paluch
4eeb58b493 Fix link to contrib guide.
Closes #2372
2021-05-07 08:39:00 +02:00
Mark Paluch
ac9b127d9c 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:51 +02:00
Mark Paluch
0d4fb6073d Introduce instantiateClass as replacement for RepositoryFactorySupport.getTargetRepositoryViaReflection.
getTargetRepositoryViaReflection accepting Class has a misleading name as it lets assume that the returned instance is a repository. In fact, this method looks up a matching constructor for the given arguments and creates an instance.

Closes #2361
2021-04-27 10:32:15 +02:00
Mark Paluch
c94fe6d2e0 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:37 +02:00
Mark Paluch
40222d6d8c Polishing.
Skip shadowed properties that are not assignable to their shadowing type.

Extend tests. Document property overrides.

Original pull request: #390.
See #1911.
2021-04-21 09:29:37 +02:00
Christoph Strobl
85578b5cb1 Ignore override properties when creating PersistentEntity.
Original pull request: #390.
Closes #1911.
2021-04-21 09:29:37 +02:00
Greg L. Turnquist
35b8a42e3d Add LICENSE file.
See #2345.
2021-04-19 16:33:45 -05:00
Greg L. Turnquist
c9d7e46f90 Authenticate against artifactory.
See #2345.
2021-04-19 16:32:47 -05:00
Greg L. Turnquist
2269fb0b77 Migrate to main branch.
See #2345.
2021-04-15 12:41:56 -05:00
Mark Paluch
da5df3495e After release cleanups.
See #2345
2021-04-14 14:30:14 +02:00
Mark Paluch
577b6bf0d2 Prepare next development iteration.
See #2345
2021-04-14 14:30:11 +02:00
Mark Paluch
a7aacccf0b Release version 2.5 GA (2021.0.0).
See #2345
2021-04-14 14:18:47 +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
Mark Paluch
37b64f5fb3 Upgrade to XMLBeam 1.4.20.
Closes #2351.
2021-04-13 10:28:25 +02:00