package ru vniins ais realty subsystem hab repository import org sprin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
package ru.vniins.ais.realty.subsystem.hab.repository;
import org.springframework.data.domain.*;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import ru.vniins.ais.realty.subsystem.hab.domain.Soldier;
public interface SoldierRepository extends PagingAndSortingRepository<Soldier, Long> {
@Query("select s from Soldier s where not exists (select e from s.employmentAgreements e where e.evictionDate is null)")
Page<Soldier> findWithoutEmploymentAgreement(Pageable pageable);
}