首页 > 解决方案 > Spring JPQL 无法比较 java LocalDateTime - 返回空列表

问题描述

我在这里得到了一些 JPQL 的代码。此查询返回空列表。知道为什么它不起作用吗?在数据库中,我得到了匹配/填充查询的东西。

@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);

文件链接:

https://github.com/.../repository/RoomBookingRepository.java

回购链接:

https://github.com/WojciechWeg/booking_service

标签: springjava-8jpqllocaldatetime

解决方案


推荐阅读