I have following method and it is working. But It doesn't work if I remove @Query
annotation.
import org.springframework.data.jdbc.repository.query.Query;
...
@Repository
public interface MyRepository extends PagingAndSortingRepository<MyRow, UUID> {
@Query("select count(*) cnt from myrow where my_job_id = :jobId and to_delete = true")
int getRowsCountByToDeleteTrueAndMyJobId(UUID jobId);
I tried to ask google about it but I wasn't abe to ask properly I suppose.