Commit Graph

1948 Commits

Author SHA1 Message Date
Oliver Drotbohm
c42f5efe01 DATACMNS-1547 - Properly remove partially populated PersistentEntity instances from cache.
We now remove partially populated PersistentEntity instances from the cache held in AbstractMappingContext as the creation could fail for other RuntimeExceptions other than a MappingException and we wouldn't want to keep the instances around in any case.

Slight refactorings in the unit tests so that we can easily create MappingContext instances that reject certain types with certain exceptions.
2019-08-30 12:11:55 +02:00
Oliver Drotbohm
3e41d932dd DATACMNS-1571 - Polishing. 2019-08-28 10:06:46 +02:00
Oliver Drotbohm
85e257fc82 DATACMNS-1571 - Fixed specialization in ParameterizedTypeInformation.
DATACMNS-783 introduced code to specialize a raw type containing generics with the type information from it's context so that it can be established if only the raw type has been e.g. stored as type hint in a store (SomeType<T> stored as SomeType and T needing to be reestablished from the context). That application of the context unfortunately did not consider that the raw type might carry generics information itself, like `SomeType extends Foo<String, Integer>`.

We've now changed the specialization algorithm so that the the target type is being looked at in the context of the type used for the assignment (e.g. `Foo<T, ID> foo`). If that assignment fully resolves the declared type, we just outright use the given type as it by definition carries all generics information plus better type information in the first place.

If the type to specialize on is only partially expanding the generics we now create a synthetic type to merge the generics information. I.e. a `SomeType<T> extends Foo<T, Integer>` stored as SomeType would still resolve ID to Integer but capture T from the context including all potentially declared bounds.

Related tickets: DATACMNS-783, DATACMNS-1138.
2019-08-28 10:06:46 +02:00
Christoph Strobl
150e327109 DATACMNS-1571 - Unit tests to reproduce the issue. 2019-08-28 10:06:46 +02:00
Jens Schauder
65b85da8f1 DATACMNS-1570 - Made the behaviour consistent between Subject part and Order By part.
The subject part wasn't decapitalizing properties starting with multiple characters properly.

Original pull request: #402.
2019-08-27 09:39:04 +02:00
Oliver Drotbohm
dcb08cfaed DATACMNS-1569 - Updated Javadoc in Querydsl APIs for nullability rules on paging and sorting. 2019-08-22 12:47:36 +02:00
Stas
34c683bc57 DATACMNS-1567 - Fixed copyright year in Repository.java.
Original pull request: #392.
2019-08-16 08:49:14 +02:00
Mark Paluch
2b326bc4d7 DATACMNS-1565 - Add HTTPS entries into spring.schemas.
To resolve XSD files properly from the classpath, their HTTPS reference must be present in the spring.schemas to avoid internet interaction for resolving an XSD file.
2019-08-06 15:37:12 +02:00
Greg Turnquist
60e94853d9 DATACMNS-1536 - Force a check for updates. 2019-08-05 10:11:05 -05:00
Mark Paluch
30d5c9770b DATACMNS-1544 - After release cleanups. 2019-08-05 15:53:02 +02:00
Mark Paluch
d36128f566 DATACMNS-1544 - Prepare next development iteration. 2019-08-05 15:53:01 +02:00
Mark Paluch
60a32143da DATACMNS-1544 - Release version 2.2 RC2 (Moore). 2019-08-05 15:35:35 +02:00
Mark Paluch
9ebbd9e33f DATACMNS-1544 - Prepare 2.2 RC2 (Moore). 2019-08-05 15:35:05 +02:00
Mark Paluch
5c85f47feb DATACMNS-1544 - Updated changelog. 2019-08-05 15:34:54 +02:00
Mark Paluch
b609cd0167 DATACMNS-1543 - Updated changelog. 2019-08-05 11:34:28 +02:00
Mark Paluch
a7c76d5593 DATACMNS-1533 - Updated changelog. 2019-08-05 11:09:00 +02:00
Mark Paluch
29c6620480 DATACMNS-1560 - Upgrade to Vavr 0.10.2. 2019-08-05 09:52:31 +02:00
Oliver Drotbohm
45a513654a DATACMNS-1558 - Upgrade to Vavr 0.10.1. 2019-07-31 10:57:29 +02:00
Sangwoo Lee
ff02d34474 DATACMNS-1557 - Fix typo in Sort Javadoc.
From `ASC` to `DESC`.

Original pull request: #400.
2019-07-29 11:07:00 +02:00
Mark Paluch
88b0b3c924 DATACMNS-1556 - Store values as array in ParametersParameterAccessor.
Prevents changes in store modules that expose values as array.
2019-07-25 14:12:11 +02:00
Mark Paluch
b8c0a2fa8f DATACMNS-1556 - Deeply inspect query results deeply for the need of query post-processing.
We now inspect returned Collections whether we need to convert these at all. If not, we skip conversion.

Also, allocate GenericConversionService only once for memory-efficiency.
2019-07-25 14:12:11 +02:00
Mark Paluch
94c4713e0f DATACMNS-1556 - Conditionally copy and unwrap query method arguments.
ParametersParameterAccessor now inspects invocation arguments whether we need to unwrap these at all. If not, we skip copying the list of values.
2019-07-25 14:12:11 +02:00
Mark Paluch
f1bc778098 DATACMNS-1556 - Remove capturing lambdas from hot code paths.
Replaced orElseThrow with if blocks. Introduce nullable RepositoryComposition.getMethod(Method) to avoid Optional handling in hot code paths.
2019-07-25 14:12:11 +02:00
Mark Paluch
972449ef2d DATACMNS-1556 - Limit default method invocation only to interfaces that actually declare default methods. 2019-07-25 14:12:11 +02:00
Mark Paluch
293bbd9a63 DATACMNS-1556 - General performance improvements in repository execution.
We now avoid the allocation of an Optional instance in the lookup of a dynamic projection in ParameterAccessor. Also, Lazy now exposes a ….getNullable() to be favored over ….getOptional() for hot code paths.

Replaced Stream and Optional usage with for-loops and nullable return values. Reuse parameter names to avoid repeated annotation lookups. Reuse result from Parameters.getBindable(). Introduce ParametersParameterAccessor.getValues() to consistently reuse a single accessor instance allowing access to the unwrapped values. Introduce type cache to QueryExecutionConverters to quickly reject types that do not require wrapping. Avoid recalculation of QueryMethod.isCollectionQuery().
2019-07-25 14:12:11 +02:00
Oliver Drotbohm
e0f2d65d73 DATACMNS-1555 - Support for extracting properties during a PersistentPropertyPath traversal.
PersistentPropertyAccessor now has an overloaded method to pass in a TraversalContext that can be prepared to property handlers for PersistentProperties. During the traversal, the handler is called with the value for the property so that it can e.g. extract list elements, map values etc.
2019-07-22 10:56:07 +02:00
Greg Turnquist
a0bcc5e20e DATACMNS-1536 - Polishing. 2019-07-19 12:04:48 -05:00
Greg Turnquist
1698a35477 DATACMNS-1536 - Publish documentation for main branch. 2019-07-19 12:04:48 -05:00
Mark Paluch
704913c866 DATACMNS-1554 - Polishing.
Replace AtTest(expected = …) and ExpectedException with the corresponding AssertJ assertThatExceptionOfType(…) and assertThatIllegalArgumentException().isThrownBy(…).
2019-07-10 11:47:46 +02:00
Mark Paluch
660006b8c9 DATACMNS-1554 - Migrate tests to AssertJ. 2019-07-10 10:32:25 +02:00
Mark Paluch
31975b5a24 DATACMNS-1553 - Fix typo. 2019-07-10 09:43:01 +02:00
Mark Paluch
6ccf9c0fde DATACMNS-1536 - Polishing.
Remove superfluous files.
2019-07-09 10:09:48 +02:00
Mark Paluch
7421ff0658 DATACMNS-1536 - Cleanup release profile.
Reuse inherited configuration from parent pom.
2019-07-09 10:09:48 +02:00
Mark Paluch
17379422d0 DATACMNS-1553 - Revise readme for a consistent structure. 2019-07-09 10:09:48 +02:00
Mark Paluch
ddd66ca8e7 DATACMNS-1553 - Remove readme for lettercasing change. 2019-07-09 09:57:14 +02:00
Greg Turnquist
6cd3100753 DATACMNS-1536 - Only use labeled nodes for CI jobs. 2019-07-05 12:07:51 -05:00
Oliver Drotbohm
fa9e5b799a DATACMNS-1552 - Test case to verify Option values are returned as is.
Make sure that the fix for DATACMNS-1524 fixes this ticket as well. A bit of whitespace in QueryExecutionResultHandler.
2019-07-04 12:23:14 +02:00
Greg Turnquist
0defbe3fa6 DATACMNS-1536 - Set build retention policy.
Also properly mount jenkins home folder for CI jobs.
2019-07-03 10:35:59 -05:00
Greg Turnquist
dc540118b3 DATACMNS-1536 - Polishing. 2019-07-02 10:49:18 -05:00
Greg Turnquist
009c5b3049 DATACMNS-1536 - Use Common 'artifactory' profile. 2019-07-02 10:40:16 -05:00
Oliver Drotbohm
d29fefca5b DATACMNS-1524 - Fix performance regression in QueryExecutionResultHandler.
A side effect of the fix for DATACMNS-1482 trigged source objects that already perfectly match the desired return type would still be subject to detailed inspection of potential conversions, which – by definition – will not kick in.

The code has now been changed to only trigger detailed inspection for collection values.

Related tickets: DATACMNS-1482.
2019-07-02 14:25:08 +02:00
Oliver Drotbohm
736d147446 DATACMNS-1550 - Polishing.
Javadoc wording and formatting.
2019-07-01 15:34:19 +02:00
Jens Schauder
f29756e5f8 DATACMNS-1550 - Added RevisionType to RevisionMetadata. 2019-07-01 15:34:19 +02:00
Mark Paluch
1e98932278 DATACMNS-1545 - Polishing.
Fix dangling callout.

Original pull request: #398.
2019-07-01 15:05:45 +02:00
Christoph Strobl
62f05057ec DATACMNS-1545 - Fix documentation anchors for entity callback API.
Original pull request: #398.
2019-07-01 15:05:40 +02:00
Oliver Drotbohm
ed0d30b4d6 DATACMNS-1551 - Polishing.
Method order in SortHandlerMethodArgumentResolver.
2019-07-01 14:30:48 +02:00
Oliver Drotbohm
4c1aed27d6 DATACMNS-1551 - SortHandlerMethodArgumentResolver now drops dot-only property segments.
If plain dots were submitted as elements in a Sort expression to be parsed by SortHandlerMethodArgumentResolver, those dots would be considered a property of the sort expression, which is of course wrong. We now drop property candidates solely consisting of dots and whitespace.
2019-07-01 14:16:09 +02:00
Greg Turnquist
bf1e00e93f DATACMNS-1536 - Don't always build based on an upstream cause. 2019-06-28 15:48:49 -05:00
Greg Turnquist
7186e98fa5 DATACMNS-1536 - Add upstream CI dependency for SD Build. 2019-06-26 10:55:38 -05:00
Greg Turnquist
d4572260c6 DATACMNS-1536 - Configure user.name and user.home for CI jobs. 2019-06-24 10:25:54 -05:00