Commit Graph

1637 Commits

Author SHA1 Message Date
Mark Paluch
6e6b4f9a85 Prepare 2.5.2 (2021.0.2).
See #2376
2021-06-22 15:51:38 +02:00
Mark Paluch
25e55ae777 Updated changelog.
See #2376
2021-06-22 15:51:30 +02:00
Mark Paluch
418fc0cbfb Updated changelog.
See #2375
2021-06-22 15:29:52 +02:00
Mark Paluch
1bdb44bb69 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:13 +02:00
Jens Schauder
733e4d8183 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:59:13 +02:00
Mark Paluch
a45873e98a 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:50 +02:00
Mark Paluch
e86480e651 Prepare 2.5.1 (2021.0.1).
See #2355
2021-05-14 12:23:21 +02:00
Mark Paluch
7e91f3358e Updated changelog.
See #2355
2021-05-14 12:23:15 +02:00
Mark Paluch
72fd400c44 Updated changelog.
See #2354
2021-05-14 12:06:39 +02:00
Mark Paluch
a7d9411581 Disable unit tests for Kotlin unsigned integers until IDE support gets fixed.
Closes #2374
2021-05-12 14:58:27 +02:00
Mark Paluch
b5ff1f08b2 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:34 +02:00
Mark Paluch
786ebec6a1 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:11 +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
Oliver Drotbohm
c643d2d90f AbstractPersistentProperty now considers association target type for ….getPersistentEntityTypes().
Prior to this commit, the lookup of types to be added as persistent entities for a given PersistentProperty used the actual property type which did not consider the association target type at all. Removed the usage of Optional for the entity type information and switched to use TypeInformation for the raw association target type so that it can be considered in ….getActualType().
2021-04-07 15:31:43 +02:00
Mark Paluch
8adfe47efa Improve ClassGeneratingEntityInstantiator error message if the to be instantiated type is abstract.
We now throw MappingInstantiationException with a nested BeanInstantiationException in alignment to ReflectionEntityInstantiator when attempting to create a new instance of an abstract class.

Closes #2348.
2021-04-06 14:15:16 +02:00
Mark Paluch
d27ac79771 Back-off in ResultProcessor if the result object is an instance of the target type.
We now do not attempt to convert the object if it is an instance of the declared target type.

Closes #2347.
2021-04-06 13:39:21 +02:00
Mark Paluch
7464325288 Updated changelog.
See #2328
2021-03-31 18:30:43 +02:00
Mark Paluch
8906e0dfad Prepare 2.5 RC1 (2021.0.0).
See #2303
2021-03-31 17:04:34 +02:00
Mark Paluch
905bdc97f0 Updated changelog.
See #2303
2021-03-31 17:04:30 +02:00
Oliver Drotbohm
23ebf3164f Support for association target type detection for jMolecules.
We now detect the component type of jMolecules' Association as association target type in AbstractPersistentProperty. AnnotationBasedPersistentProperty keeps the lookup of the explicit @Reference around but falls back to the Association analysis for that.

@Reference is now only considered by AnnotationBasedPersistentProperty. It was previously also (erroneously) considered by AbstractPersistentProperty.

It was also changed to return `null` in case no association target type could be looked up instead of returning the sole property's type in case that is an entity. This was done to satisfy the behavior documented on the interface but also to avoid the call to isEntity() during the calculation which might use association information in turn and thus lead to a stack overflow. Reworded the contract of PersistentProperty.getAssociationTargetType() to emphasize the symmetry with ….isAssociation() in implementation classes.

Closes: #2344.
2021-03-31 15:07:25 +02:00
Christoph Strobl
85c0ce1450 Polishing.
Original Pull Request: #2333
2021-03-30 12:06:58 +02:00
Mark Paluch
79ed0a75c7 Support @Value meta-annotations and expose MergedAnnotations on PreferredConstructor parameters.
We now support composed annotation that are annotated with `@Value`. we also expose MergedAnnotations through PreferredConstructor.Parameter for further use by store modules that want to inspect constructor argument annotations.

Closes: #2332
Original Pull Request: #2333
2021-03-30 12:06:03 +02:00
Mark Paluch
9224710c53 Unify return types in PageRequest.
first() and next() now retain PageRequest as return type to preserve the richer return type.

Closes #2318
2021-03-30 11:33:36 +02:00
Mark Paluch
e47faf8aa2 Improve error message if store module doesn't support a well-known fragment interface.
We now throw a RepositoryCreationException (or subclass) when a repository cannot be created due to a missing fragment, a fragment without implementation or if a well-known fragment is not supported by the repository factory.

Throw QueryCreationException if QueryExecutorMethodInterceptor cannot resolve a RepositoryQuery.

Closes #2341
Original pull request: #2342.
2021-03-29 11:14:20 +02:00
Mark Paluch
1abd534ab0 Document effect of using AccessType(PROPERTY) in combination with Persistable.
Closes #2338
Original pull request #2339
2021-03-25 11:38:49 +01:00
Mark Paluch
1eeef23fd9 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 #2336.
2021-03-22 10:06:08 +01:00
Mark Paluch
cd9bf64f74 Prepare 2.5 M5 (2021.0.0).
See #2326
2021-03-17 11:17:26 +01:00
Mark Paluch
d5d8fcb9e4 Updated changelog.
See #2326
2021-03-17 11:17:19 +01:00
Mark Paluch
ac0bb5003b Updated changelog.
See #2305
2021-03-17 11:03:38 +01:00
Mark Paluch
0e9edff5b5 Updated changelog.
See #2301
2021-03-17 10:35:11 +01:00
Mark Paluch
08cb9e848d Polishing.
Use ResolvableType for type assignability check when resolving Type from a KType.

See #2324.
2021-03-12 16:56:10 +01:00
Mark Paluch
524a33af7c Polishing.
Reduce test method visibility.

See #2324.
2021-03-12 11:30:10 +01:00
Mark Paluch
0065c17cca 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:10 +01:00
Oliver Drotbohm
d03bfb877a Introduce PersistentEntity.doWithAll(…).
To let a PropertyHandler operate on all properties *and* the inverse property of associations.

Fixes #2325.
2021-03-11 10:38:44 +01:00
Oliver Drotbohm
6b0292cc66 Support for jMolecules' Association type.
We no recognize properties of type org.jmolecules.ddd.types.Association as associations in our PersistentProperty model.

Also, we now register JMolecules Converter implementations for Association and Identifier in CustomConversions so that they can persisted like their embedded primitive value out of the box.

Fixes #2315.
Original pull request: #2316.
2021-03-01 15:20:26 +01:00
Mark Paluch
3f1609587e Polishing.
Reformat code.

Original pull request: #2314.
Closes: #2313
2021-03-01 10:33:33 +01:00
Christoph Strobl
8917115ba9 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:33:22 +01:00
Mark Paluch
f3dfd0b52c Document primitive type properties when using Query by Example.
Closes #2308.
2021-03-01 10:27:48 +01:00
Christoph Strobl
89649d6b1a Prepare 2.5 M4 (2021.0.0).
See #2304
2021-02-18 11:24:46 +01:00
Christoph Strobl
9bc1ffb8c0 Updated changelog.
See #2304
2021-02-18 11:24:41 +01:00
Christoph Strobl
b32d8097a0 Updated changelog.
See #2302
2021-02-18 11:18:24 +01:00
Christoph Strobl
1ccd4cbb56 Prepare 2.5 M3 (2021.0.0).
See #2272
2021-02-17 13:59:43 +01:00
Christoph Strobl
5405879688 Updated changelog.
See #2272
2021-02-17 13:59:34 +01:00
Christoph Strobl
84ddf33175 Updated changelog.
See #2271
2021-02-17 13:49:15 +01:00
Christoph Strobl
c0b70bcbc6 Updated changelog.
See #2257
2021-02-17 11:34:20 +01:00