@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user