I got here some piece of code of JPQL. This query returns empty list. Any idea why it doesn't work? In database I got stuff that matches/fullfills query.
@Query("select rB from RoomBookingEntity rB where ?1 between rB.dateStart and rB.dateEnd and ?2 between rB.dateStart and rB.dateEnd")
List<RoomBookingEntity> getAllBookingsWithIn(@Param("dateStartParam") LocalDateTime dateStartParam, @Param("dateEndParam") LocalDateTime dateEndParam);
Link to file:
https://github.com/.../repository/RoomBookingRepository.java
Link to repo: