Commit Graph

2470 Commits

Author SHA1 Message Date
XenoAmess
ca723d11c7 Use AnnotationUtils.findAnnotation(…) instead of AnnotatedElement.isAnnotationPresent(…).
Enable use of meta annotations by leveraging MergedAnnotations.

Closes #2500
2021-12-08 10:15:06 +01:00
Mark Paluch
8bd81a796d Fix argument expansion in RepositoryFactorySupport logging.
Closes #2502
2021-12-07 09:32:51 +01:00
Mark Paluch
788457c901 Migrate off SLF4J to Spring JCL.
Closes #2496
2021-11-16 10:48:56 +01:00
Jens Schauder
1040452c62 After release cleanups.
See #2484
2021-11-12 10:59:43 +01:00
Jens Schauder
51fd81eca1 Prepare next development iteration.
See #2484
2021-11-12 10:59:41 +01:00
Jens Schauder
ba84e875ff Release version 2.6 GA (2021.1.0).
See #2484
2021-11-12 10:49:36 +01:00
Jens Schauder
153108a3af Prepare 2.6 GA (2021.1.0).
See #2484
2021-11-12 10:49:15 +01:00
Mark Paluch
55b83dfa83 Refine documentation for PageableExecutionUtils.
Closes #2492
2021-11-09 14:48:42 +01:00
Oliver Drotbohm
c866b42025 Polishing.
A few further tweaks: ClassTypeInformation now never unwraps the user type to consistently work with the type originally presented in the lookup. That allows us to get rid of the custom equals(…)/hashCode() methods and removes the need to deal with original and user type in the same CTI instance.

The augmented caching of PersistentEntities in AbstractMappingContext now primarily happens in doAddPersistentEntity(…). We still need to implement a cache manipulation for the case that a user type has caused the creation of a PersistentEntity first and we see a lookup for the proxy type later. Before actually processing the TypeInformation we now try to lookup an already existing PersistentEntity for the user type and augment the cache if one was found.

See #2485
Original pull request: #2486.
2021-10-27 12:19:15 +02:00
Mark Paluch
ac9d11638c Polishing.
Remove isProxyTypeInformation from TypeInformation. Use computeIfAbsent to fall back to user type information when attempting to add a entity to the MappingContext.

See #2485
Original pull request: #2486.
2021-10-27 09:19:36 +02:00
Christoph Strobl
c30f3fc8af Create PersistentEntities only for user class in case of proxy instance.
This commit makes sure to only create a PersistentEntity for an actual user type. Therefore ClassTypeInformation now considers the given type and not only the user one for both equals and hashcode. This makes sure we can distinguish TypeInformation for a proxy from the one of a user class.
The AbstractMapping context will take care of unpacking proxied types and registering the created entity for both the user as well as the proxy type information.
Prior to this commit build time generated proxy instances would have been able to pollute the context depending on the order they had been served by the initial entity set.

Closes #2485
Original pull request: #2486.
2021-10-27 09:19:36 +02:00
Mark Paluch
69397a11b2 Polishing.
Reduce test element visibility, remove unused constant.

See #2472
2021-10-19 14:31:20 +02:00
Mark Paluch
7c1886201c Consider nested property paths containing a number.
PropertyPath now considers nested property paths (userLastname2 -> user.lastname2) that contain or end with a number.

Closes #2472
2021-10-19 14:31:20 +02:00
Mark Paluch
96ad5d7fb0 After release cleanups.
See #2462
2021-10-18 13:55:41 +02:00
Mark Paluch
99e55bf6cf Prepare next development iteration.
See #2462
2021-10-18 13:55:38 +02:00
Mark Paluch
51b2723882 Release version 2.6 RC1 (2021.1.0).
See #2462
2021-10-18 13:48:13 +02:00
Mark Paluch
0902ec0858 Prepare 2.6 RC1 (2021.1.0).
See #2462
2021-10-18 13:47:46 +02:00
alikilickaya
dd8a8083a5 Fix Javadoc in QueryByExampleExecutor.
Closes #2480
2021-10-13 14:16:35 +02:00
Pavel Gnusin
c383024312 Look up bean merged bean definitions in Repositories.
We now look up bean definitions for repositories using BeanFactory.getMergedBeanDefinition(…) to consider parent-child relationships across application contexts.

As we iterate through bean definitions considering ancestors we need to allow parent bean definitions. Previously, we obtained the bean definition from the child context and since the bean was inherited from the parent, the child context cannot provide a bean definition.

Closes #2383
Original pull request: #2384.
2021-10-12 09:38:54 +02:00
Mark Paluch
0cbc344483 Upgrade to Maven Wrapper 3.8.3.
See #2478
2021-10-11 14:30:25 +02:00
Mark Paluch
4e528a590a Allow reuse of ProjectionFactory from RepositoryFactorySupport.
Closes #2441
2021-10-11 11:06:52 +02:00
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