diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 08d1e609d..ea94f95ac 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -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] diff --git a/src/main/asciidoc/new-features.adoc b/src/main/asciidoc/new-features.adoc deleted file mode 100644 index 7d4b34656..000000000 --- a/src/main/asciidoc/new-features.adoc +++ /dev/null @@ -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 <> 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 <> 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 <>. -* 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 <> in repository query methods. -* Support for <>. -* 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.