O seguinte erro ta aparecendo ao startar a aplicação:
Validation failed for query for method public abstract java.lang.Boolean med.voll.api.domain.paciente.PacienteRepository.findAtivoById(java.lang.Long)
O código ta assim:
package med.voll.api.domain.paciente;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
@Repository
public interface PacienteRepository extends JpaRepository<Paciente, Long>{
Page<Paciente> findAllByAtivoTrue(Pageable page);
@Query("""
select p.ativo
from Paciente p
where
p.id = :id
""")
Boolean findAtivoById(Long id);
}