fix HQL pet query

This commit is contained in:
2026-04-20 05:09:57 -06:00
parent cdf49b8379
commit c10c9d6d78

View File

@@ -53,7 +53,7 @@ public interface AppointmentRepository extends JpaRepository<Appointment, Long>
List<Appointment> findByPet_Id(Long petId);
@Query("SELECT a FROM Appointment a JOIN FETCH a.service WHERE a.pet.petId = :petId AND a.appointmentDate = :date AND LOWER(a.appointmentStatus) NOT IN ('cancelled', 'missed')")
@Query("SELECT a FROM Appointment a JOIN FETCH a.service WHERE a.pet.id = :petId AND a.appointmentDate = :date AND LOWER(a.appointmentStatus) NOT IN ('cancelled', 'missed')")
List<Appointment> findByPetIdAndAppointmentDate(@Param("petId") Long petId, @Param("date") LocalDate date);
List<Appointment> findByAppointmentDateAndAppointmentStatusIgnoreCase(LocalDate date, String status);