Replace New and Noteworthy with links to release notes.

Closes #2697
See https://github.com/spring-projects/spring-data-relational/issues/1351
This commit is contained in:
Jens Schauder
2022-11-10 12:29:15 +01:00
parent 34e16e34c5
commit c5e53d5799
2 changed files with 1 additions and 57 deletions

View File

@@ -12,7 +12,7 @@ NOTE: Copies of this document may be made for your own use and for distribution
include::preface.adoc[]
include::new-features.adoc[leveloffset=+1]
include::{spring-data-commons-docs}/upgrade.adoc[leveloffset=+1]
include::{spring-data-commons-docs}/dependencies.adoc[leveloffset=+1]

View File

@@ -1,56 +0,0 @@
[[new-features]]
= New & Noteworthy
[[new-features.3-0]]
== What's New in Spring Data JPA 3.0
* Upgrade to Hibernate 6.
See <<new-features.3-0.hibernate-6, this section>> for what to consider when upgrading.
* Support for null handling definitions via `Sort`.
[[new-features.3-0.hibernate-6]]
=== Upgrading to Hibernate 6
Spring Data 3.0 upgrades its Hibernate baseline to Hibernate 6.
As quite a few things have changed in that version, a couple of things that have worked before might need some tweaks.
* _Using JPA named queries with pagination_ -- Pagination requires Spring Data to derive a count query from the originally declared one loading the actual content of the Page.
For queries declared as JPA named queries we have relied on provider-specific API to obtain the original source query and tweak it accordingly.
On Hibernate 6, in certain arrangements that query extraction might fail.
We recommend to either rather declare the queries on the repository methods directly using `@Query`.
* _Using positional parameters with pagination_ -- When using positional parameters with pagination queries you need to make sure that the parameter indexes still start with 1, even with a potential `ORDER BY` clause removed from the query.
This is because, the count query derived from the original one will have that clause removed from the query and Hibernate 6 rejects queries parameter indexes not starting at 1.
We generally recommend to use named parameters anyway.
* _Applying JPA entity graphs_ -- Under certain model conditions, the application of entity graphs might fail on Hibernate 6.
See https://hibernate.atlassian.net/browse/HHH-15391[this ticket] for details.
We generally recommend to rather use <<projections, interface or DTO projections>> instead of entity graphs.
* _Using `… like … escape ?#{escapeCharacter()}` in queries_ -- If you have customized the global default escape character (via `@EnableJpaRepositories(escapeCharacter = '…')`) the application of that through the corresponding SpEL expression currently fails.
See https://hibernate.atlassian.net/browse/HHH-15392[this ticket] for details.
[[new-features.2-5-0]]
== What's New in Spring Data JPA 2.5
There is a new `getById` method in the `JpaRepository` which will replace `getOne`, which is now deprecated.
Since this method returns a reference this changes the behaviour of an existing `getById` method which before was implemented by query derivation.
This in turn might lead to an unexpected `LazyLoadingException` when accessing attributes of that reference outside a transaction.
To avoid this please rename your existing `getById` method to `getXyzById` with `Xyz` being an arbitrary string.
[[new-features.1-11-0]]
== What's New in Spring Data JPA 1.11
Spring Data JPA 1.11 added the following features:
* Improved compatibility with Hibernate 5.2.
* Support any-match mode for <<query-by-example>>.
* Paged query optimizations.
* Support for the `exists` projection in repository query derivation.
[[new-features.1-10-0]]
== What's New in Spring Data JPA 1.10
Spring Data JPA 1.10 added the following features:
* Support for <<projections>> in repository query methods.
* Support for <<query-by-example>>.
* The following annotations have been enabled to build on composed annotations: `@EntityGraph`, `@Lock`, `@Modifying`, `@Query`, `@QueryHints`, and `@Procedure`.
* Support for the `Contains` keyword on collection expressions.
* `AttributeConverter` implementations for `ZoneId` of JSR-310 and ThreeTenBP.
* Upgrade to Querydsl 4, Hibernate 5, OpenJPA 2.4, and EclipseLink 2.6.1.