diff --git a/src/docbkx/reference/jpa.xml b/src/docbkx/reference/jpa.xml index bbfb65264..7eee95757 100644 --- a/src/docbkx/reference/jpa.xml +++ b/src/docbkx/reference/jpa.xml @@ -438,7 +438,8 @@ public class User { in orm.xml. - Declare query at the query method using @Query + Declare query at the query method using + <interfacename>@Query</interfacename> public interface UserRepository extends JpaRepository<User, Long> { @@ -456,6 +457,17 @@ public class User { dynamic sorting for native queries as we'd have to manipulate the actual query declared and we cannot do this reliably for native SQL. + + + Declare a native query at the query method using + <interfacename>@Query</interfacename> + + public interface UserRepository extends JpaRepository<User, Long> { + + @Query(value = "SELECT FROM USERS WHERE EMAIL_ADDRESS = ?0", nativeQuery = true) + User findByEmailAddress(String emailAddress); +} + @@ -570,7 +582,7 @@ int setFixedFirstnameFor(String firstname, String lastname); Specifications in a variety of ways. For example, the readAll method will return all - entities that match the specification: + entities that match the specification: List<T> readAll(Specification<T> spec);