DATAJPA-876, DATAJPA-838 - Add AD-HOC entity graph sample and what's new section.
Original pull request: #167
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]]
|
||||
|
||||
13
src/main/asciidoc/new-features.adoc
Normal file
13
src/main/asciidoc/new-features.adoc
Normal 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.
|
||||
|
||||
Reference in New Issue
Block a user