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