Skip to content

Commit b0d0029

Browse files
committed
Fix cross references
1 parent c0aa015 commit b0d0029

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

modules/ROOT/pages/envers.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class EnversIntegrationTests {
189189
}
190190
}
191191
----
192-
<1> This references the application context configuration presented earlier (in the <<envers.configuration>> section).
192+
<1> This references the application context configuration presented earlier (in the xref:envers.adoc#envers.configuration[Configuration] section).
193193
====
194194

195195
[[envers.resources]]

modules/ROOT/pages/jpa/introduction.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
This section describes the basics of configuring Spring Data JPA through either:
55

6-
* "`<<jpa.namespace>>`" (XML configuration)
7-
* "`<<jpa.java-config>>`" (Java configuration)
6+
* "`xref:jpa/introduction.adoc#jpa.namespace[Spring Namespace]`" (XML configuration)
7+
* "`xref:jpa/introduction.adoc#jpa.java-config[Annotation-based Configuration]`" (Java configuration)
88

99
[[jpa.java-config]]
1010
== Annotation-based Configuration

modules/ROOT/pages/jpa/query-methods.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Derived queries with the predicates `IsStartingWith`, `StartingWith`, `StartsWit
1212
`IsNotContaining`, `NotContaining`, `NotContains`, `IsContaining`, `Containing`, `Contains` the respective arguments for these queries will get sanitized.
1313
This means if the arguments actually contain characters recognized by `LIKE` as wildcards these will get escaped so they match only as literals.
1414
The escape character used can be configured by setting the `escapeCharacter` of the `@EnableJpaRepositories` annotation.
15-
Compare with <<jpa.query.spel-expressions>>.
15+
Compare with xref:jpa/query-methods.adoc#jpa.query.spel-expressions[Using SpEL Expressions].
1616

1717
[[jpa.query-methods.declared-queries]]
1818
=== Declared Queries
19-
Although getting a query derived from the method name is quite convenient, one might face the situation in which either the method name parser does not support the keyword one wants to use or the method name would get unnecessarily ugly. So you can either use JPA named queries through a naming convention (see <<jpa.query-methods.named-queries>> for more information) or rather annotate your query method with `@Query` (see <<jpa.query-methods.at-query>> for details).
19+
Although getting a query derived from the method name is quite convenient, one might face the situation in which either the method name parser does not support the keyword one wants to use or the method name would get unnecessarily ugly. So you can either use JPA named queries through a naming convention (see xref:jpa/query-methods.adoc#jpa.query-methods.named-queries[Using JPA Named Queries] for more information) or rather annotate your query method with `@Query` (see xref:jpa/query-methods.adoc#jpa.query-methods.at-query[Using `@Query`] for details).
2020

2121
[[jpa.query-methods.query-creation]]
2222
== Query Creation
@@ -313,7 +313,7 @@ Sorting can be done by either providing a `PageRequest` or by using `Sort` direc
313313

314314
NOTE: Using any non-referenceable path expression leads to an `Exception`.
315315

316-
However, using `Sort` together with <<jpa.query-methods.at-query, `@Query`>> lets you sneak in non-path-checked `Order` instances containing functions within the `ORDER BY` clause. This is possible because the `Order` is appended to the given query string. By default, Spring Data JPA rejects any `Order` instance containing function calls, but you can use `JpaSort.unsafe` to add potentially unsafe ordering.
316+
However, using `Sort` together with xref:jpa/query-methods.adoc#jpa.query-methods.at-query[`@Query`] lets you sneak in non-path-checked `Order` instances containing functions within the `ORDER BY` clause. This is possible because the `Order` is appended to the given query string. By default, Spring Data JPA rejects any `Order` instance containing function calls, but you can use `JpaSort.unsafe` to add potentially unsafe ordering.
317317

318318
The following example uses `Sort` and `JpaSort`, including an unsafe option on `JpaSort`:
319319

@@ -359,7 +359,7 @@ This method avoids https://use-the-index-luke.com/no-offset[the shortcomings of
359359

360360
Read more on <<repositories.scrolling.guidance,which method to use best>> for your particular arrangement.
361361

362-
You can use the Scroll API with query methods, <<query-by-example.running,Query-by-Example>>, and <<core.extensions.querydsl,Querydsl>>.
362+
You can use the Scroll API with query methods, xref:query-by-example.adoc[Query-by-Example], and <<core.extensions.querydsl,Querydsl>>.
363363

364364
NOTE: Scrolling with String-based query methods is not yet supported.
365365
Scrolling is also not supported using stored `@Procedure` query methods.
@@ -506,12 +506,12 @@ Spring Data JPA offers many ways to build queries.
506506
But sometimes, your query may simply be too complicated for the techniques offered.
507507
In that situation, consider:
508508

509-
* If you haven't already, simply write the query yourself using <<jpa.query-methods.at-query,`@Query`>>.
509+
* If you haven't already, simply write the query yourself using xref:jpa/query-methods.adoc#jpa.query-methods.at-query[`@Query`].
510510
* If that doesn't fit your needs, consider implementing a <<repositories.custom-implementations,custom implementation>>. This lets you register a method in your repository while leaving the implementation completely up to you. This gives you the ability to:
511511
** Talk directly to the `EntityManager` (writing pure HQL/JPQL/EQL/native SQL or using the *Criteria API*)
512512
** Leverage Spring Framework's `JdbcTemplate` (native SQL)
513513
** Use another 3rd-party database toolkit.
514-
* Another option is putting your query inside the database and then using either Spring Data JPA's <<jpa.stored-procedures,`@StoredProcedure` annotation>> or if it's a database function using the <<jpa.query-methods.at-query,`@Query` annotation>> and invoking it with a `CALL`.
514+
* Another option is putting your query inside the database and then using either Spring Data JPA's xref:jpa/stored-procedures.adoc[`@StoredProcedure` annotation] or if it's a database function using the xref:jpa/query-methods.adoc#jpa.query-methods.at-query[`@Query` annotation] and invoking it with a `CALL`.
515515

516516
These tactics may be most effective when you need maximum control of your query, while still letting Spring Data JPA provide resource management.
517517

0 commit comments

Comments
 (0)