Commit Graph

1483 Commits

Author SHA1 Message Date
Mark Paluch
dca844dd6f Document effect of using AccessType(PROPERTY) in combination with Persistable.
Closes #2338
Original pull request #2339
2021-03-25 11:40:07 +01:00
Mark Paluch
b6581ebd14 Fix Kotlin copy method assignability check.
We now resolve only the raw class when checking if a primary constructor argument is assignable to method parameters of the synthetic copy method.
Previously we used ResolvableType's assignability check which considered generic type arguments. As the type resolution between the KType and copy method type is not symmetric, the check only succeeded in cases where both types could be resolved to the same type/assignable type. Using projections or Any caused asymmetric resolution and therefor the assignability check returned non-assignable.

Closes #2324.
2021-03-22 10:06:47 +01:00
Mark Paluch
8b5f4674d2 Updated changelog.
See #2326
2021-03-17 11:31:30 +01:00
Mark Paluch
9b21241ebf Prepare 2.4.6 (2020.0.6).
See #2305
2021-03-17 10:53:43 +01:00
Mark Paluch
94fd0641a1 Updated changelog.
See #2305
2021-03-17 10:53:38 +01:00
Mark Paluch
f4699a7c08 Updated changelog.
See #2301
2021-03-17 10:35:12 +01:00
Mark Paluch
d43d5add66 Polishing.
Use ResolvableType for type assignability check when resolving Type from a KType.

See #2324.
2021-03-12 16:56:53 +01:00
Mark Paluch
6a5812b3de Use primary copy method for Kotlin data classes.
We now resolve the copy method for Kotlin data classes that match the primary constructor. Previously, copy method resolution could find a secondary copy method as we didn't check for the primary constructor structure (parameter names and types).

Closes #2324.
2021-03-12 11:30:01 +01:00
Mark Paluch
aaf5858f49 Polishing.
Reformat code.

Original pull request: #2314.
Closes: #2313
2021-03-01 10:34:53 +01:00
Christoph Strobl
8f4befff83 Collect constructor type information via Constructor.getParameters().
This commit fixes an issue where we fail to detect all type arguments from a given constructor. calling getGenericParameterTypes in some cases does not include all Types, we now explicitly iterate over the parameters and extract the parameterized type that is used for creating the TypeInformation.

Closes: #2313
Original pull request: #2314.
2021-03-01 10:34:53 +01:00
Mark Paluch
5454b37870 Document primitive type properties when using Query by Example.
Closes #2308.
2021-03-01 10:27:43 +01:00
Christoph Strobl
8192e93830 Updated changelog.
See #2304
2021-02-18 11:37:45 +01:00
Christoph Strobl
9384de2785 Prepare 2.4.5 (2020.0.5).
See #2302
2021-02-18 10:58:49 +01:00
Christoph Strobl
45fde0bf2f Updated changelog.
See #2302
2021-02-18 10:58:42 +01:00
Christoph Strobl
4e8afe507e Updated changelog.
See #2272
2021-02-17 14:20:36 +01:00
Christoph Strobl
7bc3ab9a0e Prepare 2.4.4 (2020.0.4).
See #2271
2021-02-17 11:59:37 +01:00
Christoph Strobl
ad4e80ebc5 Updated changelog.
See #2271
2021-02-17 11:59:32 +01:00
Christoph Strobl
f33811ce8c Updated changelog.
See #2257
2021-02-17 11:34:21 +01:00
Christoph Strobl
197f2be570 Updated changelog.
See #2255
2021-02-17 10:58:23 +01:00
Christoph Strobl
08e408bea2 Use NativeDetector.inNativeImage() instead of manual property check.
Closes: #2298
Original pull request: #2299.
Relates to: spring-projects/spring-framework#25795
2021-02-17 09:14:24 +01:00
Mark Paluch
180c640f54 Consider primary repository definition in Repositories when created Repositories using ApplicationContext.
Closes #1583.
Original pull request: #465.
2021-02-15 15:58:56 +01:00
Mark Paluch
8cdf602167 Improve guards to avoid potential ClassCastException.
We now guard Slice conversion against potential ClassCastException using the proper condition grouping. Previously, the conversion could happen if the query is a slice query while the source was not a Slice.

Resolves #2296.
2021-02-15 15:32:06 +01:00
Mark Paluch
a16ce61a36 Polishing.
Slightly tweak wording.

See #2283
Original pull request: #2285
2021-02-09 11:53:43 +01:00
Christoph Strobl
aa6f660508 Update auditing documentation.
Mention that even when only using the CreatedDate & LastModifiedDate annotations it is mandatory to enable auditing.
Add sample of using auditing metadata within an embedded entity.

Closes #2283
Original pull request: #2285
2021-02-09 11:53:43 +01:00
Mark Paluch
5fc665ae29 Add negative-caching in PreferredConstructor.isConstructorParameter(…).
We now cache the negative outcome of PreferredConstructor.isConstructorParameter(…) to avoid iterations and iterator allocations which roughly improves typical converter usage by roughly 32%.

Before:
Benchmark                                                               Mode  Cnt        Score        Error  Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField  thrpt   10  6848447,474 ± 554354,377  ops/s

After
Benchmark                                                               Mode  Cnt        Score         Error  Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField  thrpt   10  9071099,879 ± 1423166,087  ops/s

Closes #2295.
2021-02-09 11:44:28 +01:00
Mark Paluch
64e8ba54d3 Polishing.
Remove outdated section.

See #2288
2021-02-02 14:41:04 +01:00
Christoph Strobl
c537643e8d Document SpringDataJacksonModules in web support section.
Closes #2288
Original pull request: #2289.
2021-02-02 14:39:35 +01:00
Valeriy.Vyrva
a097edb07d Convert Vavr Seq to list with asJava method.
asJava(…) creates a read-only view instead of copying elements into a new List.

Closes #2217
Original pull request: #287
2021-01-26 10:38:49 +01:00
Oliver Drotbohm
47ee922ac3 Avoid pre-computing base URI in PagedResourceAssemblerArgumentResolver.
We now avoid the pre-computation of the base URI in PagedResourceAssemblerArgumentResolver as the actual assembler will fall back to using the URI of the current request by default anyway. The latter makes sure that request parameters, that are contained in the original requests appear in links created. If a controller wants to deviate from that behavior, they can create a dedicated link themselves and hand that to the assembler explicitly.

Fixes GH-2173, GH-452.
2021-01-26 10:00:57 +01:00
Mark Paluch
8a1be49c04 Guard potential null dereference in recursive initialization calls.
We now assign the repository field before resolving the persistent entity through the mapping context to avoid a potential NPE caused by a getObject(…) invocation through an application event.

Closes #2068
2021-01-26 09:47:42 +01:00
Mark Paluch
42997ac704 Fix constructor resolution for Kotlin classes using unsigned types.
We now leniently skip parameter name resolution for types using unsigned types. The issue is caused by Kotlin's DefaultConstructorMarker that doesn't report a parameter name.

Closes #2215
2021-01-18 13:51:40 +01:00
Christoph Strobl
6970077335 Updated changelog.
See #2258
2021-01-13 15:49:43 +01:00
Christoph Strobl
0ae0c44d5c Prepare 2.4.3 (2020.0.3).
See #2259
2021-01-13 14:17:43 +01:00
Christoph Strobl
69c4022974 Updated changelog.
See #2259
2021-01-13 14:17:41 +01:00
Jens Schauder
5407e400cc Add JSR310 converters to the converters used for projections.
Similar converters where removed because they clashed with the support for nullable wrappers. This adds them back as dedicated converters that does not clash with conversions for nullable wrappers.

See bd3992dfc5 (diff-96f7084777a2a702d85f5c600e542b10123d6c3332ed3d3f8e329ca7061faab0R55)

Original Pull Request: #479
Closes: #2223
2021-01-13 07:04:37 +01:00
Mark Paluch
5d2d06d1b8 Polishing.
Reuse definitive path flag without recompile the expression.

See #2270
2021-01-12 15:47:11 +01:00
Mark Paluch
75d67ce620 Correctly unwrap nested JSON array projections.
We now check for double-nesting of JSON path evaluation results when the return type is a collection. If the result is double-wrapped and the nested object is a collection then we unwrap it.

Closes #2270
2021-01-12 15:47:11 +01:00
Mark Paluch
81f03e86cc Update copyright year to 2021.
Closes #2268.
2021-01-07 13:42:39 +01:00
Michael Simons
f1636e3315 Polishing.
See #2263
Original pull request #2267
2021-01-07 11:20:49 +01:00
Mark Paluch
790f0c1655 #2263 - Update repository after GitHub issues migration. 2020-12-30 11:45:18 +01:00
Mark Paluch
5500e90e6b DATACMNS-1831 - Prepare 2.4.2 (2020.0.2). 2020-12-09 16:00:53 +01:00
Mark Paluch
c7d85a5f7d DATACMNS-1831 - Updated changelog. 2020-12-09 16:00:49 +01:00
Mark Paluch
d3d1252ce6 DATACMNS-1824 - Updated changelog. 2020-12-09 15:33:23 +01:00
Mark Paluch
7431c86c65 DATACMNS-1822 - Updated changelog. 2020-12-09 12:42:24 +01:00
Mark Paluch
eb4ef13b6c DATACMNS-1821 - Updated changelog. 2020-12-09 09:59:13 +01:00
Mark Paluch
390c4f5f3e DATACMNS-1838 - Accept ExpressionDependencies in BasicPersistentEntity.getEvaluationContext(…).
Allow obtaining an EvaluationContext with a reduced set of extensions that are required for ExpressionDependencies instead of initializing all extensions.
2020-12-07 11:27:25 +01:00
Mark Paluch
949457fdea DATACMNS-1827 - Polishing.
Extract qualifier lookup into SpringDataAnnotationUtils.

Original pull request: #474.
2020-12-01 10:15:39 +01:00
Vedran Pavic
f9a776ba1d DATACMNS-1827 - Consider Qualifier meta-annotated Sort method parameters.
Original pull request: #474.
2020-12-01 10:15:27 +01:00
Mark Paluch
80c63f7d72 DATACMNS-1837 - Polishing.
Consistent callout indentation. Tweak wording.

Original pull request: #475.
2020-12-01 10:02:33 +01:00
Michael Simons
7e44dbfcea DATACMNS-1837 - Add the required override to the example.
The example should be a compilable unit.

Original pull request: #475.
2020-12-01 10:02:33 +01:00