Skip to content

Commit

Permalink
VKT(Backend): Person not considered obsolete if there's an Enrollment…
Browse files Browse the repository at this point in the history
…Appointment linked to them
  • Loading branch information
pkoivisto committed Dec 19, 2024
1 parent 2be82ac commit b07aa4c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public interface PersonRepository extends BaseRepository<Person> {
" FROM Person p" +
" WHERE p.latestIdentifiedAt < ?1" +
" AND NOT EXISTS (SELECT 1 FROM Enrollment e WHERE e.person = p)" +
" AND NOT EXISTS (SELECT 1 FROM EnrollmentAppointment ea WHERE ea.person = p)" +
" AND NOT EXISTS (SELECT 1 FROM Reservation r WHERE r.person = p)"
)
List<Person> findObsoletePersons(final LocalDateTime latestIdentifiedBefore);
Expand Down

0 comments on commit b07aa4c

Please sign in to comment.