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
e.g. (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)
?