Commit Graph

768 Commits

Author SHA1 Message Date
Oliver Gierke
19bdd10780 DATACMNS-1358 - Updated changelog. 2018-08-20 11:07:53 +02:00
Michael J. Simons
761974245a DATACMNS-1351 - Remove superfluous backslashes from reference documentation.
Original pull request: #300.
2018-08-15 15:19:35 +02:00
Oliver Gierke
32fa24fc56 DATACMNS-1370 - Avoid superflous, regex-based type check while scanning for custom implementations. 2018-08-09 13:16:15 +02:00
Mark Paluch
994de93bc5 DATACMNS-1362 - Fix broken links to Spring Framework reference documentation. 2018-08-06 08:53:55 +02:00
Mark Paluch
6c5629b1e7 DATACMNS-1339 - Prepare 1.13.14 (Ingalls SR14). 2018-07-27 09:20:28 +02:00
Mark Paluch
2dcd5656ea DATACMNS-1339 - Updated changelog. 2018-07-27 09:20:17 +02:00
Mark Paluch
abbd69c930 DATACMNS-1340 - Updated changelog. 2018-07-26 16:23:54 +02:00
Mark Paluch
848a2422bd DATACMNS-1321 - Updated changelog. 2018-07-26 14:03:16 +02:00
Mark Paluch
98c1aac7d7 DATACMNS-1352 - Report InvalidPersistentPropertyPath on non-resolvable entities.
We now throw InvalidPersistentPropertyPath during property path resolution if an intermediate path segment cannot resolve an entity to resolve the next segment. This can be caused when a non-entity typed property (e.g. List<Object>) is used within the property path and the path resolution attempts to resolve a property path on the non-entity typed property. Previously, resolution failed with NullPointerException.
2018-07-10 12:45:13 +02:00
Mark Paluch
9ab497f431 DATACMNS-1313 - Updated changelog. 2018-06-13 21:39:51 +02:00
Mark Paluch
196e73bb15 DATACMNS-1312 - Prepare 1.13.13 (Ingalls SR13). 2018-06-13 10:48:03 +02:00
Mark Paluch
99245bfdca DATACMNS-1312 - Updated changelog. 2018-06-13 10:47:55 +02:00
Oliver Gierke
5c86417a2d DATACMNS-1304 - PropertyPath now supports properties with all uppercase endings.
Backport of the changes applied to Lovelace and Kay.

Original pull request: #289.
2018-06-05 18:48:20 +02:00
Oliver Gierke
394bd4c6da DATACMNS-1328 - DefaultRepositoryInvokerFactory now uses a ConcurrentHashMap.
We now use ConcurrentHashMap to prevent ConcurrentModificationExceptions in multithreaded access to repository invokers.
2018-05-31 10:29:43 +02:00
Oliver Gierke
18782d70c9 DATACMNS-1326 - PersistentPropertyInspectingIsNewStrategy now considers primitive type's defaults.
PersistentPropertyInspectingIsNewStrategy now considers entities with primitive default identifier values new.
2018-05-19 00:04:33 +02:00
Oliver Gierke
1b742306ad DATACMNS-1325 - Added dedicated identifier accessor for Persistable entities.
BasicPersistentEntity now returns a dedicated IdentifierAccessor that uses Persistable.getId() in case the entity implements Persistable.
2018-05-18 23:59:21 +02:00
Oliver Gierke
c31e2cb251 DATACMNS-1324 - Introduced extensible proxy detection infrastructure.
Introduced ProxyUtils.getUserClass(…) that by default is basically a facade for Spring's ClassUtils.getUserClass(…) but allows the registration of ProxyDetector implementations via Spring's SpringFactoriesLoader mechanism.

Moved all existing usages of ClassUtils.getUserClass(…) to ProxyUtils.
2018-05-17 17:26:58 +02:00
Christoph Strobl
704370760a DATACMNS-1295 - Updated changelog. 2018-05-17 10:32:53 +02:00
Jay Bryant
2da62609a9 DATACMNS-1315 - Added a cover page for epub output.
I added a cover page for the epub output, now that the Spring data reference guides will have epub output (through a commit against spring-data-build).

Original pull request: #290.
2018-05-11 16:43:37 +02:00
Mark Paluch
22f7f19a09 DATACMNS-1288 - Updated changelog. 2018-05-08 15:27:18 +02:00
Mark Paluch
c30cf08cc1 DATACMNS-1287 - Prepare 1.13.12 (Ingalls SR12). 2018-05-08 10:49:48 +02:00
Mark Paluch
4262a47435 DATACMNS-1287 - Updated changelog. 2018-05-08 10:49:38 +02:00
Mark Paluch
0dd11bb0c0 DATACMNS-1294 - Polishing.
Remove ReadingConverter annotation from LocalDateToDateConverter to consider LocalDate a simple type. This issue was introduced by a merge conflict.
2018-05-08 10:00:39 +02:00
Oliver Gierke
11d0aa1b39 DATACMNS-1292 - Improved default setup of XMLBeam.
We now explicitly disable entity expansion in the DocumentBuilderFactory used by XMLBeam.

Introduced constructor in XmlBeamHttpMessageConverter to allow dedicated configuration of an XBProjector instance in case the defaults need tweaking and augmented the web configuration setup to automatically pick up a custom XmlBeamHttpMessageConverter bean instead of our own default if present.
2018-05-08 09:50:08 +02:00
Mark Paluch
73415d0593 DATACMNS-1308 - Load TransactionalProxy through the provided class loader.
We now load TransactionalProxy through the configured class loader for a consistent class loader usage. Loading types reflectively through the same class loader prevents visibility issues. Previously, we did not specify any class loader which defaults to the Thread's ClassLoader and which can be a different one than the configured class loader. This can cause visibility issues when implementing proxy classes as the proxy factory checks for visibilit of the particularly implemented interfaces.
2018-05-03 15:53:36 +02:00
Mark Paluch
6348a3d7ee DATACMNS-1308 - Polishing.
Remove trailing whitespaces.
2018-05-03 15:45:05 +02:00
Mark Paluch
ca34e4bd3e DATACMNS-1294 - Enforce JSR-310 type mapping to java.util.Date.
After considering JSR-310 types to be simple we map these types primarily to java.util.Date as the majority of stores does not natively support JSR-310 types. Converters referencing JSR-310 types are now properly annotated with Reading/WritingConverter annotations to distinguish between reading and writing intents.

Othwerise, converters between JSR-310/java.util types and Joda/ThreeTenBackport to JSR-310 types interfere with conversion as regular java.util.Date types would convert to e.g. LocalDateTime.
2018-04-19 09:58:59 +02:00
Oliver Gierke
5708d6af12 DATACMNS-1294 - Consider java.time types simple ones.
To prevent repeated failing calls to ClassUtils.forName(…) we now also cache the failed attempt and simply eagerly return null as subsequent similar attempts to resolve a class are going to fail anyway.

Original pull request: #286.
2018-04-18 18:51:47 +02:00
Oliver Gierke
8d99e0d83d DATACMNS-1301 - SimpleTypeInformationMapper.resolveTypeFrom(…) now caches failed resolution attempts.
To prevent repeated failing calls to ClassUtils.forName(…) we now also cache the failed attempt and simply eagerly return null as subsequent similar attempts to resolve a class are going to fail anyway.
2018-04-18 11:55:39 +02:00
Mark Paluch
1001f4e71f DATACMNS-1299 - Polishing.
Consider GeoResults as native wrapper to properly unwrap its component type.
2018-04-17 10:05:56 +02:00
Oliver Gierke
f3c138258b DATACMNS-1300 - Improved collection query detection for Iterables.
Previously a custom Iterable implementation would've caused QueryMethod.isCollectionQuery() to return true. We now solely rely on TypeInformation.isCollectionLike() (which checks for exact Iterable, Collection assignability and arrays) after handling potential wrapper types.
2018-04-16 16:29:50 +02:00
Oliver Gierke
0daac0c890 DATACMNS-1299 - QueryExecutionsConverters now don't unwrap custom Iterable implementations.
Instead of a simple check for assignability from Iterable, we now properly use TypeInformation.isCollectionLike(), which checks for Iterable equality or assignability of collections or arrays as well as an explicit check for Slice as that is needed to properly unwrap Page instances and Slices themselves. That prevents custom domain types implementing Iterable from being unwrapped into their element types.
2018-04-16 16:25:55 +02:00
Mark Paluch
48a7a023f8 DATACMNS-1257 - Updated changelog. 2018-04-13 15:11:27 +02:00
Chengyuan Zhao
567d665111 DATACMNS-1291 - Fix method signature in repository projection documentation.
Original pull request: #285.
2018-04-13 09:40:53 +02:00
Mark Paluch
f1860f3c14 DATACMNS-1291 - Polishing.
Typo fixes, align Enable…Repositories annotation wording, document reactive return types.

Original pull request: #281.
2018-04-13 09:30:05 +02:00
Jay Bryant
200e156de8 DATACMNS-1291 - Documentation full editing pass.
Edited for spelling, punctuation, grammar, and corporate voice. Also added cross-references in a few places.

Original pull request: #281.
2018-04-13 09:29:24 +02:00
Mark Paluch
f4070ce288 DATACMNS-1293 - Polishing.
Fix leftovers pointing to legacy Querydsl packages in Javadoc. Reformat code.

Original pull request: #284.
2018-04-12 14:32:52 +02:00
Robert Winkler
1f60389a36 DATACMNS-1293 - Fixed Querydsl package reference in QuerydslPredicateArgumentResolver Javadoc.
Original pull request: #284.
2018-04-12 14:31:17 +02:00
Mark Paluch
790a7e5f30 DATACMNS-1267 - Updated changelog. 2018-04-04 17:12:52 +02:00
Mark Paluch
d0d2b8658f DATACMNS-1248 - Prepare 1.13.11 (Ingalls SR11). 2018-04-04 14:20:47 +02:00
Mark Paluch
7ab6bd2745 DATACMNS-1248 - Updated changelog. 2018-04-04 14:20:38 +02:00
Oliver Gierke
371f6590c5 DATACMNS-1285 - PropertyPath now limits the depth of its parsing to 1000 segments. 2018-04-03 19:30:21 +02:00
Mark Paluch
999d26436b DATACMNS-1284 - Polishing.
Backport of 06116b7.

Related ticket: DATACMNS-1206.
Original commit: 06116b7.
2018-04-03 10:42:45 +02:00
Oliver Gierke
428b0decd5 DATACMNS-1284 - Polishing.
Backport of 5eb10a0 but leaving out the Stream execution optimizations.

Related ticket: DATACMNS-1206.
Original commit: 5eb10a0.
2018-04-03 10:41:17 +02:00
Mark Paluch
eed005427d DATACMNS-1281 - Backport of addition of API to read methods in declaration order.
We now provide MethodsMetadataReader to read method metadata from a class file. MethodMetadata is read for all user-declared methods except for constructors (which are technically methods, too).

MethodsMetadataReaderFactory factory = new MethodsMetadataReaderFactory();
MethodsMetadataReader metadataReader = factory.getMetadataReader("com.acme.Foo");
MethodsMetadata metadata = metadataReader.getMethodsMetadata();

This new API is now used by DefaultProjectionInformation to make sure the order of input properties is based on the declaration order in the projection interfaces. Previously that order could not be guaranteed to be stable.

Original pull request: #263.
Related tickets: DATACMNS-1206.
Original commit: 9e013d3.
2018-04-03 10:41:08 +02:00
Oliver Gierke
b1a20ae1e8 DATACMNS-1282 - Switched to SimpleEvaluationContext in MapDataBinder. 2018-03-28 09:02:38 +02:00
Oliver Gierke
8bbcca2ef2 DATACMNS-1281 - Fixed potential concurrency issue in MappingAuditableBeanWrapperFactory.
We now use a ConcurrentReferenceHashMap to cache the metadata calculated to prevent ConcurrentModificationExceptions getBeanWrapperFor(…).
2018-03-27 15:58:04 +02:00
Mark Paluch
3527f195dc DATACMNS-1273 - Polishing.
Remove trailing whitespaces.
2018-03-05 09:45:08 +01:00
Mark Paluch
ada4498968 DATACMNS-1273 - Consider merged annotations when populating for annotation cache.
We now consider property annotations as merged annotations when initially scanning for annotations in a property declaration. Composed annotations such as declared outside our code are captured correctly because they use an own type that is not queried by users of PersistentProperty. Own, revised annotations, using @AliasFor providing an alias for annotation values require merged annotation processing.

Previously, annotations were cached as-is without resolving @AliasFor. This caused a later lookup via findAnnotation(…) to return the cached annotation without aliasing. Because the annotation was cached, no further lookup via AnnotatedElementUtils.findMergedAnnotation(…) was attempted.

@Retention(RetentionPolicy.RUNTIME)
@Target(value = { FIELD, METHOD })
public @interface RevisedAnnnotationWithAliasFor {

	@AliasFor("value")
	String name() default "";

	@AliasFor("name")
	String value() default "";
}

public class Person {
	@RevisedAnnnotationWithAliasFor(value = "spring")
	String firstname;
}

PersistentProperty firstname = …

property.findAnnotation(…) returned previously @RevisedAnnnotationWithAliasFor(value = "spring", name = "")

now we return @RevisedAnnnotationWithAliasFor(value = "spring", name = "spring")

Original ticket: DATACMNS-981.
Java 6 compatible backport of 2da5acc553.
2018-03-05 09:43:07 +01:00
Oliver Gierke
aadeebbb7d DATACMNS-1271 - Streamlined implementation of AnnotationBasedPersistentProperty to avoid NullPointerExceptions.
Java 6 compatible backport of 78d21327 and 7e7d4baa.
2018-03-02 11:08:34 +01:00