Spring JPQL cannot compare java LocalDateTime - returns empty list

134 views Asked by At

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:

https://github.com/WojciechWeg/booking_service

0

There are 0 answers