Skip to content

Commit 92f1fe1

Browse files
Seungpangmp911de
authored andcommitted
Fix typo and broken links in documentation.
Closes #3489
1 parent e8058f5 commit 92f1fe1

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
This section describes how to persist (save) entities with Spring Data JPA.
55

6-
[[jpa.entity-persistence.saving-entites]]
6+
[[jpa.entity-persistence.saving-entities]]
77
== Saving Entities
88

99
Saving an entity can be performed with the `CrudRepository.save(…)` method. It persists or merges the given entity by using the underlying JPA `EntityManager`. If the entity has not yet been persisted, Spring Data JPA saves the entity with a call to the `entityManager.persist(…)` method. Otherwise, it calls the `entityManager.merge(…)` method.
1010

11-
[[jpa.entity-persistence.saving-entites.strategies]]
11+
[[jpa.entity-persistence.saving-entities.strategies]]
1212
=== Entity State-detection Strategies
1313
Spring Data JPA offers the following strategies to detect whether an entity is new or not:
1414

src/main/antora/modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CdiConfig {
4646

4747
In the preceding example, the container has to be capable of creating JPA `EntityManagers` itself. All the configuration does is re-export the JPA `EntityManager` as a CDI bean.
4848

49-
The Spring Data JPA CDI extension picks up all available `EntityManager` instances as CDI beans and creates a proxy for a Spring Data repository whenever a bean of a repository type is requested by the container. Thus, obtaining an instance of a Spring Data repository is a matter of declaring an `@Injected` property, as shown in the following example:
49+
The Spring Data JPA CDI extension picks up all available `EntityManager` instances as CDI beans and creates a proxy for a Spring Data repository whenever a bean of a repository type is requested by the container. Thus, obtaining an instance of a Spring Data repository is a matter of declaring an `@Inject` property, as shown in the following example:
5050

5151
[source, java]
5252
----

src/main/antora/modules/ROOT/pages/jpa/misc-merging-persistence-units.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ A plain JPA setup requires all annotation-mapped entity classes to be listed in
3737
----
3838
====
3939

40-
NOTE: As of Spring 3.1, a package to scan can be configured on the `LocalContainerEntityManagerFactoryBean` directly to enable classpath scanning for entity classes. See the link:{springJavadocUrl}org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.html#setPackagesToScan(java.lang.String...)$$[JavaDoc] for details.
40+
NOTE: As of Spring 3.1, a package to scan can be configured on the `LocalContainerEntityManagerFactoryBean` directly to enable classpath scanning for entity classes. See the link:{springJavadocUrl}/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.html#setPackagesToScan(java.lang.String...)$$[JavaDoc] for details.
4141

src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Generally, the query creation mechanism for JPA works as described in {spring-da
2525

2626
.Query creation from method names
2727
====
28+
[source, java]
2829
----
2930
public interface UserRepository extends Repository<User, Long> {
3031
@@ -52,7 +53,7 @@ The following table describes the keywords supported for JPA and what a method c
5253
|`After`|`findByStartDateAfter`|`… where x.startDate > ?1`
5354
|`Before`|`findByStartDateBefore`|`… where x.startDate < ?1`
5455
|`IsNull`, `Null`|`findByAge(Is)Null`|`… where x.age is null`
55-
|`IsNotNull`, `NotNull`|`findByAge(Is)NotNull`|`… where x.age not null`
56+
|`IsNotNull`, `NotNull`|`findByAge(Is)NotNull`|`… where x.age is not null`
5657
|`Like`|`findByFirstnameLike`|`… where x.firstname like ?1`
5758
|`NotLike`|`findByFirstnameNotLike`|`… where x.firstname not like ?1`
5859
|`StartingWith`|`findByFirstnameStartingWith`|`… where x.firstname like ?1` (parameter bound with appended `%`)
@@ -76,7 +77,7 @@ For example, `select distinct u from User u` will produce a complete different r
7677
In the first case, since you are including `User.id`, nothing will duplicated, hence you'll get the whole table, and it would be of `User` objects.
7778
7879
However, that latter query would narrow the focus to just `User.lastname` and find all unique last names for that table.
79-
This would also yield a `List<String>` result set instead of a `List<User`> result set.
80+
This would also yield a `List<String>` result set instead of a `List<User>` result set.
8081
8182
8283
`countDistinctByLastname(String lastname)` can also produce unexpected results.
@@ -130,7 +131,7 @@ The query has a special name that is used to resolve it at runtime.
130131

131132
[[jpa.query-methods.named-queries.declaring-interfaces]]
132133
=== Declaring Interfaces
133-
To allow these named queries, specify the `UserRepositoryWithRewriter` as follows:
134+
To allow these named queries, specify the `UserRepository` as follows:
134135

135136
.Query method declaration in UserRepository
136137
====

0 commit comments

Comments
 (0)