I need to query a function of the database, by SQL, something so simple as
@Query("SELECT random()")
how to implement a domain/repository or service method that do it?
I need to query a function of the database, by SQL, something so simple as
@Query("SELECT random()")
how to implement a domain/repository or service method that do it?
There are various ways how to bind stored procedures with Spring Data JPA (using JPA 2.1).
Simplest example: