I have Spring Application with a repository
interface EventRepository extends JpaRepository<Event, Long>, QueryByExampleExecutor<Event> { }
Event e = new Event();
e.setTest('ABC');
eventRepository.findAll(Example.of(e), pageable);
Is working great and I am almost there. But I need to restrict to a date range between 'from' and 'to'
I have seen some post that it is not working with QBE but this was in 2015.
I have created a Range object but I don't know how to apply it.
I can not use the default spring way like
@Transactional
interface EventRepository extends JpaRepository<Event, Long>, QueryByExampleExecutor<Event> {
def findBetween(Date lower, Date upper)
}
because I have a bunch of dynamic search parameters.