Skip to content

Commit 027796d

Browse files
DATAJPA-876, DATAJPA-838 - Add AD-HOC entity graph sample and what's new section.
Original pull request: #167
1 parent 5b9a5b1 commit 027796d

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

src/main/asciidoc/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ NOTE: Copies of this document may be made for your own use and for distribution
1414
toc::[]
1515

1616
include::preface.adoc[]
17+
1718
:leveloffset: +1
19+
include::new-features.adoc[]
1820
include::{spring-data-commons-docs}/dependencies.adoc[]
1921
include::{spring-data-commons-docs}/repositories.adoc[]
2022
:leveloffset: -1

src/main/asciidoc/jpa.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,23 @@ public interface GroupRepository extends CrudRepository<GroupInfo, String> {
445445
----
446446
====
447447

448+
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.
449+
450+
.Using AD-HOC entity graph definition on an repository query method.
451+
====
452+
[source, java]
453+
----
454+
@Repository
455+
public interface GroupRepository extends CrudRepository<GroupInfo, String> {
456+
457+
@EntityGraph(attributePaths = { "members" })
458+
GroupInfo getByGroupName(String name);
459+
460+
}
461+
----
462+
====
463+
464+
448465
include::{spring-data-commons-docs}/repository-projections.adoc[leveloffset=+2]
449466

450467
[[jpa.stored-procedures]]

src/main/asciidoc/new-features.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[new-features]]
2+
= New & Noteworthy
3+
4+
[[new-features.1-10-0]]
5+
== What's new in Spring Data JAP 1.10
6+
7+
* Support for <<projections>> in repository query methods.
8+
* Support for <<query-by-example>>.
9+
* The following annotations have been enabled to build own, composed annotations: `@EntityGraph`, `@Lock`, `@Modifying`, `@Query`, `@QueryHints` and `@Procedure`.
10+
* Support for `Contains` keyword on collection expressions.
11+
* AttributeConverters for `ZoneId` of JSR-310 and ThreeTenBP.
12+
* Upgrade to Querydsl 4, Hibernate 5, OpenJPA 2.4 and EclipseLink 2.6.1.
13+

0 commit comments

Comments
 (0)