我有一个名为Employee的文档。我想查询所有在2019年至2020年之间指定为“开发人员”并加入日期的员工。
class Employee{
private String name;
private String designation;
private Date joiningDate;
}
**// i want where condition on designation to be included in the following**
@Repository
public interface EmployeeRepository extends MongoRepository<Employee,String> {
@Query("{'joiningDate' : {$gte : ?0,$lte : ?1}}")
public List<Employee> findByJoiningDateBetween(LocalDateTime startTime,LocalDateTime endTime);
}