我正在尝试在IntelliJ中运行以下查询:
@Query(value = "" +
"SELECT offer FROM OfferEntity offer " +
" JOIN offer.placeOwnership AS owner " +
" JOIN owner.place AS place " +
"WHERE " +
" place.id = :placeId AND " +
" offer.dayFrom = :offerDate AND " +
" offer.repeating = false")
在执行此操作时,我被要求提供参数placeId
和offerDate
。我的问题是我对后者一无所知。
我不知道如何运行此查询。
我也试图像这样在控制台内手动运行它:
SELECT offer FROM OfferEntity offer
JOIN offer.placeOwnership AS owner
JOIN owner.place AS place
WHERE
place.id = 1L AND
offer.dayFrom = java.time.LocalDate.parse("2018-10-08") AND
offer.repeating = false
但是这给了我一个语法错误。