DATAJPA-1622 - Polishing.

Original pull request: #433.
This commit is contained in:
Jens Schauder
2020-10-26 15:04:03 +01:00
parent ab1f93ff13
commit f3d5f8a6f6

View File

@@ -141,7 +141,7 @@ Spring Data JPA offers the following strategies to detect whether an entity is n
1. Version-Property and Id-Property inspection (*default*):
By default Spring Data JPA inspects first if there is a Version-property of non-primitive type.
If there is, the entity is considered new if the value is `null`.
If there is, the entity is considered new if the value of that property is `null`.
Without such a Version-property Spring Data JPA inspects the identifier property of the given entity.
If the identifier property is `null`, then the entity is assumed to be new.
Otherwise, it is assumed to be not new.
@@ -302,7 +302,8 @@ public interface UserRepository extends JpaRepository<User, Long> {
----
====
Spring Data tries to resolve a call to these methods to a named query, starting with the simple name of the configured domain class, followed by the method name separated by a dot. So the preceding example would use the named queries defined earlier instead of trying to create a query from the method name.
Spring Data tries to resolve a call to these methods to a named query, starting with the simple name of the configured domain class, followed by the method name separated by a dot.
So the preceding example would use the named queries defined earlier instead of trying to create a query from the method name.
[[jpa.query-methods.at-query]]
=== Using `@Query`