Skip to content

Release Train 2021.1 (Q) Release Notes

Mark Paluch edited this page Nov 10, 2021 · 21 revisions

General Themes

  • Upgrade to Querydsl 5.0

  • Improved jMolecules’ @Identity ID annotation support

  • Deprecated RxJava 2 support in preparation for removal

  • Fluent Query API for Querydsl and Query-by-Example

  • MongoDB @DocumentReference

  • MongoDB schema derivation for encrypted fields

  • MongoDB 5.0 Time Series support

  • Redis 6.2 support

  • Support for streaming large result sets in Spring Data JDBC

  • Spring Data JDBC SQL Builder refinements around conditions, JOINs and SELECT projections

  • Support for cyclic mapping in Neo4j projections

  • Support for Querydsl in Neo4j

Upgrading from Spring Data 2021.0

New and Noteworthy

Spring Data Commons - 2.6

Support jMolecules' @Identity Annotation for Identifiers

Domain models can now use jMolecules' @Identity annotation to denote the identifier property of an aggregate root to improve developer experience when using jMolecules.

Fluent Query API for Querydsl and Query-by-Example

QuerydslPredicateExecutor, QueryByExampleExecutor and their reactive variants now define with findBy(…) a query method that allows fluent definition of queries. The fluent API allows customization of projections, sort properties and various terminal methods introducing consumption of results as Stream and other return types. Support for the fluent API is available in all store modules that already support Querydsl or Query by Example.

Publish Delete Events by Repository methods deleteInBatch and deleteAllInBatch

Repositories that support deleteInBatch and deleteAllInBatch methods now publish @DomainEvents when deleting multiple aggregates using batch functionality. From Spring Data’s core modules JPA is now supporting this functionality.

Support for Smallrye Mutiny

Repositories can now make use of Smallrye Mutiny types such as Uni and Multi in repository query methods. These types serve also as markers to detect whether a repository is a reactive one.

Deprecated RxJava 2 Support

RxJava 2 support is now deprecated for removal with Spring Data 3.0. RxJava 2 is end-of-life as of February 28, 2021 and we recommend using RxJava 3 instead.

Tickets

M3

  • #2438 - Support jMolecules' @Identity as ID annotation.

  • #2448 - Publish delete events by repository methods deleteInBatch and deleteAllInBatch methods.

RC1

  • #2228 - Add support for QueryDSL and Query by Example projections through a fluent API in repositories.

  • #2470 - Deprecate support for RxJava 2.

  • #2471 - Add Smallrye Mutiny support.

Spring Data JPA - 2.6

M1

  • #1959 - REF_CURSOR support for stored procedures.

M2

Spring Data MongoDB - 3.3

Add support for creating Time-Series Collection

MongoDB 5.0 introduced Time Series collections that are optimized to efficiently store documents over time such as measurements or events. Those collections need to be created as such before inserting any data. Collections can be created by either running the createCollection command, defining time series collection options or extracting options from a @TimeSeries annotation used on domain classes.

@TimeSeries(collection = "weather", timeField = "timestamp")
public class Measurement {
    String id;
    Instant timestamp;
    // ...
}

See the Spring Data MongoDB documentation for further reference.

Support for Wildcard Indexes

Wildcard indexes can be created programatically or declaratively. The annotation-driven declaration style covers various use-cases such as full-document indexes or indexes for maps. Consult the documentation for wildcard indexes to learn about the details.

Inclusion/Exclusion of null properties on write

Properties whose values is null were skipped when writing a Document from an entity. @Field(write=…) can now be used to control whether to skip (default) such properties or whether to force a null property to be written to the Document.

Schema Derivation for Encrypted Properties

MongoDB’s Client-Side Field-Level Encryption requires a schema map to let the driver transparently encrypt and decrypt fields of a document.To simplify the configuration. properties in the domain model can be annotated with @Encrypted. MongoJsonSchemaCreator can create the schema map for Mongo’s AutoEncryptionSettings based on the domain model. Schema generation considers the algorithm and key identifiers.

The documentation on Encrypted Fields explains the configuration in detail.

Tickets

M1

  • Add support for creating time series collection. #3731

  • Add support for flexible document references. #3602

  • Add support for Wildcard Indexes #3225

M2

M3

  • Add configuration support for MongoDB ServerApiVersion #3820

  • Add support for deriving json schema for encrypted properties. #3800

Spring Data Neo4j - 6.2

M1

M2

Spring Data Elasticsearch - 4.3

M1

  • #1767 - DynamicMapping annotation should be applicable to any object field.

  • #1454 - Allow disabling TypeHints.

  • #1787 - Search with MoreLikeThisQuery should use Pageable.

  • #1792 - Upgrade to Elasticsearch 7.12.1.

  • #1800 - Improve handling of immutable classes.

  • #1255 - Add pipeline aggregations to NativeSearchQuery.

  • #1816 - Allow runtime_fields to be defined in the index mapping.

  • #1831 - Upgrade to Elasticsearch 7.13.0.

  • #1839 - Upgrade to Elasticsearch 7.13.1.

  • #1862 - Add native support for range field types by using a range object.

  • #1864 - Upgrade to Elasticsearch 7.13.3.

M2

M3

  • #1917 - Fix @Query method implementation for unpaged queries.

  • #1926 - Change mapping of connectionRequestTimeout to ConnPool leaseTimeout.

  • #1892 - Upgrade to Elasticsearch 7.14.

RC1

  • #1938 - Add @QueryAnnotation meta annotation to @Query.

  • #1941 - Upgrade to Elasticsearch 7.15.0.

  • #1909 - Add repository search for nullable or empty properties..

  • #1950 - AbstractElasticsearchTemplate.searchForStream use Query scrolltime.

  • #1945 - Enable custom converters for single fields .

  • #1911 - Supply a custom Sort.Order providing Elasticsearch specific parameters.

  • #769 - Support for field exclusion from source.

GA

  • #1971 - Add possibility to define runtime fields in a search request.

  • #1974 - Query setScrollTime not working on reactive search.

  • #1978 - Set RefreshPolicy parameter to the ElasticRestTemplate copy.

Spring Data Couchbase - 4.3

M1

M2

Spring Data for Apache Cassandra - 3.3

M1

M2

Spring Data for Apache Geode - 2.6

M1

M2

Spring Data Redis - 2.6

M1

  • Redis 6.2 Command support

  • Redis Cache writer clean performance optimization #1721

M3

  • Enable ReactiveRedisTemplate for multi-tenancy usage #2145

Spring Data KeyValue - 2.6

M1

M2

Spring Data REST - 3.6

M1

M2

Spring Data LDAP - 2.6

M1

M2

Spring Data JDBC - 2.3

M1

  • #578 - Support for streaming large result sets.

  • #974 - Better support for java.time types.

  • #935 - Dialects register database dependent custom conversions.

  • #987 - Support for AggregateReference in query derivation.

M2

  • #920 - The Postgres dialect now consideres PGobject a simple type.

Spring Data R2DBC - 1.4

M1

M2

Spring Data Envers - 2.6

M1

M2

Release Dates

  • M1 - Jul 16, 2021

  • M2 - Aug 13, 2021

  • M3 - Sept 17, 2021

  • RC1 - Oct 14, 2021

  • GA - Nov 12, 2021

Clone this wiki locally