source: backend/src/main/java/com/finki/icare/repository/TherapyRepository.java

main
Last change on this file was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago

Init

  • Property mode set to 100644
File size: 596 bytes
Line 
1package com.finki.icare.repository;
2
3import com.finki.icare.model.Therapy;
4import org.springframework.data.jpa.repository.JpaRepository;
5import org.springframework.data.jpa.repository.Query;
6import org.springframework.data.repository.query.Param;
7import org.springframework.stereotype.Repository;
8
9import java.util.List;
10
11@Repository
12public interface TherapyRepository extends JpaRepository<Therapy, Integer> {
13
14 @Query("SELECT t FROM Therapy t WHERE t.consultation.idConsultation = :consultationId")
15 List<Therapy> findByConsultationId(@Param("consultationId") Integer consultationId);
16}
17
Note: See TracBrowser for help on using the repository browser.