I need to create an interface that extends the JpaRepository where I want to pass a native (select) query per parameter instead of leaving static within the @Query
annotation.
Instead of using @Query(value = "select * from a where a = :a", nativeQuery = true)
I want to use the code sampled below.
public interface MeuRepository extends JpaRepository<MeuEntity, Integer>{
@Query(value = query, nativeQuery = true)
List<MeuEntity> findCustomNativeQuery(String query);
}