Commit Graph

2449 Commits

Author SHA1 Message Date
Mark Paluch
511181193e Add FluentQuery support to QueryByExampleExecutor and ReactiveQueryByExampleExecutor.
FluentQuery allows extending a query specification initially defined by a Example probe or a Querydsl Predicate and fetching the actual result through a functional programming model:

interface PersonRepository extends QuerydslPredicateExecutor<Person> {
  <S extends T, R> R findBy(Predicate predicate, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction);
}

PersonRepository repo = …;

List<PersonProjection> result = repo.findBy(QPerson.person.name.eq("Walter"), q -> q.sort(Sort.by("lastname")).as(PersonProjection.class).all());

Closes: #2228
Original pull request: #2421.
2021-10-08 09:17:38 +02:00
Mark Paluch
f1f08933da Polishing.
Add since and author tags. Add ticket references to tests. Reformat code.

See #2471
2021-10-06 10:13:00 +02:00
hantsy
d18275770c Add Smallrye Mutiny support.
Closes #2471
2021-10-06 09:55:20 +02:00
Mark Paluch
03de5995c7 Document restrictions of simple base-repository method overrides in regard to projections.
Closes #2473
2021-10-05 11:35:52 +02:00
Mark Paluch
82fd3cac27 Deprecate support for RxJava 2.
Closes #2470
2021-09-27 14:04:36 +02:00
Mark Paluch
a11340b85e Polishing.
See #2423
2021-09-21 14:24:29 +02:00
Mark Paluch
9fbf39154f Fix Javadoc.
Fix invalid links. Replace Javadoc links to JSR-305 with code annotations.

Replace self-enclosing tags with simple ones.

See #2423
2021-09-21 11:11:30 +02:00
Mark Paluch
bf3c9a5c6c Add Java 17 verification to CI pipeline.
Avoid usage of encapsulated tests as dummies. Add dependency override for ASM dependencies.

Replace Java 16 with Java 17 in CI pipeline.

Closes #2423
2021-09-21 11:11:29 +02:00
Mark Paluch
571cb36e31 After release cleanups.
See #2435
2021-09-17 09:52:21 +02:00
Mark Paluch
eb5bb18cb7 Prepare next development iteration.
See #2435
2021-09-17 09:52:18 +02:00
Mark Paluch
0529471ad2 Release version 2.6 M3 (2021.1.0).
See #2435
2021-09-17 09:44:56 +02:00
Mark Paluch
1ca24f89f0 Prepare 2.6 M3 (2021.1.0).
See #2435
2021-09-17 09:44:33 +02:00
Mark Paluch
bb3898add3 Consider property path root in QuerydslBindings.
We now consider a qualified property path when registering and querying `QuerydslBindings` to ensure that paths matching various domain types do not accidentally get applied for a different type than they were registered for.
Previously, a binding for `Address.description` would be also applied to `User.description` as only the property path `description` was considered when looking up bindings.

Closes: #2418
Original Pull Request: #2422
2021-09-14 16:06:12 +02:00
Dmitriy Bogdanov
0505fc4975 Add missing spaces to the docs and fix leveloffset.
Closes: #2454
2021-09-14 10:11:03 +02:00
Mark Paluch
27d4918ad5 Publish delete events by repository methods deleteInBatch and deleteAllInBatch methods.
We now publish events from deleteInBatch and deleteAllInBatch methods to consider well-known repository methods.
We also now prevent event publication if the method argument is not an instance of the domain type.

Closes: #2448.
2021-09-14 10:08:54 +02:00
Mark Paluch
dfb6387135 Update wording from Appendix to Appendices.
Closes #2452
2021-09-14 08:41:48 +02:00
Mark Paluch
2bc1c540ea Upgrade to Maven Wrapper 3.8.2.
See #2450
2021-09-10 15:37:55 +02:00
Mark Paluch
f4805503c8 Reuse generated entity instantiators from ClassGeneratingEntityInstantiator instances.
We now reuse generated ObjectInstantiator classes instead of attempting to redefine classes with the same name. Redefinition leads to LinkageError and thus to the use of reflection-based instantiators and an increased allocation rate due to the failed attempt of class redeclaration.

Closes: #2446.
2021-09-09 15:18:30 +02:00
Mark Paluch
242a71ca56 Avoid Iterator allocations when calling Sort.isSorted().
Closes #2445
2021-09-07 16:07:24 +02:00
Mark Paluch
c0d85aabc5 Polishing.
See #2416
2021-09-07 09:23:25 +02:00
schlagi123
d9e1303185 Fix typo in entity state detection documentation.
Closes #2416
2021-09-07 09:22:52 +02:00
Michael Simons
2ff0ee2993 Remove remark about AbstractAuditable.
This class only exists in Spring Data JPA, not in Commons.

Closes #2437
2021-09-07 09:15:13 +02:00
Oliver Drotbohm
c7c2df6cd9 Support for jMolecules' @Identity annotation.
Fixes #2438
Original pull request: #2439.
2021-09-07 09:12:51 +02:00
Mark Paluch
23ff807a90 Remove tests that check for absence of parameter names.
Closes #2444
2021-09-07 09:09:34 +02:00
Oliver Drotbohm
3c887f6319 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:44 +02:00
Jens Schauder
4acd3b7003 After release cleanups.
See #2415
2021-08-12 15:16:23 +02:00
Jens Schauder
9caacf1cc8 Prepare next development iteration.
See #2415
2021-08-12 15:16:21 +02:00
Jens Schauder
522c9504b5 Release version 2.6 M2 (2021.1.0).
See #2415
2021-08-12 15:03:17 +02:00
Jens Schauder
ff8b4218e2 Prepare 2.6 M2 (2021.1.0).
See #2415
2021-08-12 15:02:54 +02:00
Jens Schauder
e46ae6a275 Upgrade javax.interceptor to 1.2.2.
Closes #2430
2021-08-11 19:28:39 +02:00
Jens Schauder
ff00fdad6e Upgrade javax.transaction to 1.3.
Closes #2429
2021-08-11 19:28:39 +02:00
Jens Schauder
f4ed858079 Upgrade Vavr to 0.10.4.
Closes #2428
2021-08-11 19:28:29 +02:00
Oliver Drotbohm
fbe513446d 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:06:56 +02:00
Mark Paluch
fd586ebfdf Remove changelog shipped with the binaries.
Closes #2419
2021-07-22 08:28:57 +02:00
Mark Paluch
5fd8687506 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:17:22 +02:00
Greg L. Turnquist
2511b1f1d6 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:16:30 +02:00
Jens Schauder
17c8e7fcce After release cleanups.
See #2357
2021-07-16 14:19:57 +02:00
Jens Schauder
bb9f53f84d Prepare next development iteration.
See #2357
2021-07-16 14:19:55 +02:00
Jens Schauder
332036ed32 Release version 2.6 M1 (2021.1.0).
See #2357
2021-07-16 14:09:25 +02:00
Jens Schauder
a5fdd5ef74 Prepare 2.6 M1 (2021.1.0).
See #2357
2021-07-16 14:08:58 +02:00
Jens Schauder
4910564a36 Updated changelog.
See #2357
2021-07-16 14:08:39 +02:00
Jens Schauder
3a77bb8cb7 Updated changelog.
See #2387
2021-07-16 10:48:16 +02:00
Mark Paluch
db8431ee41 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:44 +02:00
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