Last change
on this file was e5fefbd, checked in by Anita Terziska <63020646+Nit4e@…>, 2 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
584 bytes
|
Line | |
---|
1 | package com.example.medweb.repository;
|
---|
2 |
|
---|
3 | import com.example.medweb.model.Pacient;
|
---|
4 | import com.example.medweb.model.Upat;
|
---|
5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
6 | import org.springframework.data.jpa.repository.Query;
|
---|
7 | import org.springframework.stereotype.Repository;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 | import java.util.Optional;
|
---|
11 |
|
---|
12 |
|
---|
13 | @Repository
|
---|
14 | public interface UpatRepository extends JpaRepository<Upat, Integer> {
|
---|
15 |
|
---|
16 | Optional<Upat> findById(Integer upat_id);
|
---|
17 |
|
---|
18 | @Query("select u from Upat u where u.pacient = :pacient")
|
---|
19 | List<Upat> findAllByPacient (Pacient pacient);
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.