Commit Graph

2376 Commits

Author SHA1 Message Date
Mark Paluch
698cf28410 Disable unit tests for Kotlin unsigned integers until IDE support gets fixed.
Closes #2374
2021-05-12 14:58:04 +02:00
Mark Paluch
4eeb58b493 Fix link to contrib guide.
Closes #2372
2021-05-07 08:39:00 +02:00
Mark Paluch
ac9b127d9c 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:51 +02:00
Mark Paluch
0d4fb6073d Introduce instantiateClass as replacement for RepositoryFactorySupport.getTargetRepositoryViaReflection.
getTargetRepositoryViaReflection accepting Class has a misleading name as it lets assume that the returned instance is a repository. In fact, this method looks up a matching constructor for the given arguments and creates an instance.

Closes #2361
2021-04-27 10:32:15 +02:00
Mark Paluch
c94fe6d2e0 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:37 +02:00
Mark Paluch
40222d6d8c Polishing.
Skip shadowed properties that are not assignable to their shadowing type.

Extend tests. Document property overrides.

Original pull request: #390.
See #1911.
2021-04-21 09:29:37 +02:00
Christoph Strobl
85578b5cb1 Ignore override properties when creating PersistentEntity.
Original pull request: #390.
Closes #1911.
2021-04-21 09:29:37 +02:00
Greg L. Turnquist
35b8a42e3d Add LICENSE file.
See #2345.
2021-04-19 16:33:45 -05:00
Greg L. Turnquist
c9d7e46f90 Authenticate against artifactory.
See #2345.
2021-04-19 16:32:47 -05:00
Greg L. Turnquist
2269fb0b77 Migrate to main branch.
See #2345.
2021-04-15 12:41:56 -05:00
Mark Paluch
da5df3495e After release cleanups.
See #2345
2021-04-14 14:30:14 +02:00
Mark Paluch
577b6bf0d2 Prepare next development iteration.
See #2345
2021-04-14 14:30:11 +02:00
Mark Paluch
a7aacccf0b Release version 2.5 GA (2021.0.0).
See #2345
2021-04-14 14:18:47 +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
Mark Paluch
37b64f5fb3 Upgrade to XMLBeam 1.4.20.
Closes #2351.
2021-04-13 10:28:25 +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
5f36ebf525 Upgrade to XMLBeam 1.4.19.
Closes #2349
2021-04-07 10:47:01 +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
8a4a809035 After release cleanups.
See #2303
2021-03-31 17:24:05 +02:00
Mark Paluch
879e631bae Prepare next development iteration.
See #2303
2021-03-31 17:24:03 +02:00
Mark Paluch
2df2a47598 Release version 2.5 RC1 (2021.0.0).
See #2303
2021-03-31 17:05:07 +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
912d89f40d Update version number suffixes in readme to reflect the used versioning scheme.
Closes #2337
2021-03-22 10:19:21 +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
fa7ddcb223 After release cleanups.
See #2326
2021-03-17 11:30:30 +01:00
Mark Paluch
5fcbcceb2f Prepare next development iteration.
See #2326
2021-03-17 11:30:28 +01:00
Mark Paluch
897cde4571 Release version 2.5 M5 (2021.0.0).
See #2326
2021-03-17 11:17:49 +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