DATAJPA-876, DATAJPA-838 - Add AD-HOC entity graph sample and what's new section.

Original pull request: #167
This commit is contained in:
Christoph Strobl
2016-03-25 09:32:38 +01:00
parent 5b9a5b17eb
commit b16f18a605
3 changed files with 32 additions and 0 deletions

View File

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

View File

@@ -445,6 +445,23 @@ public interface GroupRepository extends CrudRepository<GroupInfo, String> {
----
====
It is also possible to define _ad-hoc_ entity graphs via `@EntityGraph`. The provided `attributePaths` will be translated into the according `EntityGraph` without the need of having to explicitly add `@NamedEntityGraph` to your domain types.
.Using AD-HOC entity graph definition on an repository query method.
====
[source, java]
----
@Repository
public interface GroupRepository extends CrudRepository<GroupInfo, String> {
@EntityGraph(attributePaths = { "members" })
GroupInfo getByGroupName(String name);
}
----
====
include::{spring-data-commons-docs}/repository-projections.adoc[leveloffset=+2]
[[jpa.stored-procedures]]

View File

@@ -0,0 +1,13 @@
[[new-features]]
= New & Noteworthy
[[new-features.1-10-0]]
== What's new in Spring Data JPA 1.10
* Support for <<projections>> in repository query methods.
* Support for <<query-by-example>>.
* The following annotations have been enabled to build own, composed annotations: `@EntityGraph`, `@Lock`, `@Modifying`, `@Query`, `@QueryHints` and `@Procedure`.
* Support for `Contains` keyword on collection expressions.
* AttributeConverters for `ZoneId` of JSR-310 and ThreeTenBP.
* Upgrade to Querydsl 4, Hibernate 5, OpenJPA 2.4 and EclipseLink 2.6.1.