I have this model:
public class Event {
private String name;
private Date start;
private Date end;
}
and repository as
@Repository
public interface EventRepository extends JpaRepository<Event, Long> {
List<Event> findByEventTypeAccount(Account account);
}
What I want to do is, I will pass one date and need to check that date is between start
and end
eg(i will pass sept 30 as date and need to find all entries which have sept 30 between their start
and end
)
Something like findDateisBetweenStartAndEnd(Date date)
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…