The @Query annotation allows to execute native queries by setting the nativeQuery flag to true.
Quote from Spring Data JPA reference docs.
Also, see this section on how to do it with a named native query.
More Related Contents:
- How does the FetchMode work in Spring Data JPA
- ImprovedNamingStrategy no longer working in Hibernate 5
- Spring boot JPA insert in TABLE with uppercase name with Hibernate
- Can I combine a @Query definition with a Specification in a Spring Data JPA repository method?
- Spring Data JPA: Batch insert for nested entities
- Refresh and fetch an entity after save (JPA/Spring Data/Hibernate)
- Spring JpaRepository – Detach and Attach entity
- How to map sql native query result into DTO in spring jpa repository?
- Difference between save and saveAndFlush in Spring data jpa
- Delete Not Working with JpaRepository
- spring data jpa @query and pageable
- Apparent connection leak detected with Hikari CP
- Why has javax.persistence-api been replaced by jakarta.persistence-api in spring data jpa starter?
- Spring Data JPA: How can Query return Non- Entities Objects or List of Objects?
- setMaxResults for Spring-Data-JPA annotation?
- Mapping ManyToMany with composite Primary key and Annotation:
- Unable to get spring boot to automatically create database schema
- How to use @Id with String Type in JPA / Hibernate?
- I found JPA, or alike, don’t encourage DAO pattern
- How to maintain bi-directional relationships with Spring Data REST and JPA?
- Hibernate SessionFactory vs. JPA EntityManagerFactory
- Hibernate use of PostgreSQL sequence does not affect sequence table
- Hibernate error – QuerySyntaxException: users is not mapped [from users]
- Create the perfect JPA entity [closed]
- Disabling contextual LOB creation as createClob() method threw error
- Deprecated createCriteria method in Hibernate 5
- HQL left join of un-related entities
- What properties does @Column columnDefinition make redundant?
- org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
- How to get jdbc connection from hibernate session? [duplicate]