我有这个型号:
public class Event {
private String name;
private Date start;
private Date end;
}
Run Code Online (Sandbox Code Playgroud)
和存储库为
@Repository
public interface EventRepository extends JpaRepository<Event, Long> {
List<Event> findByEventTypeAccount(Account account);
}
Run Code Online (Sandbox Code Playgroud)
我想要做的是,我将传递一个日期,需要检查日期间start和endEG(我将通过9月30日期和需要找到具有9月30日他们之间的所有条目start和end)
有点像findDateisBetweenStartAndEnd(Date date)?