【发布时间】:2017-11-17 07:33:02
【问题描述】:
select * from ngb.subsidy where (有效开始日期,有效结束日期)重叠 ('2017-08-01'::DATE, '2017-08-01'::DATE) 按有效开始日期 asc 排序
以下给定的查询不起作用
@Query(value="select * from ngb.security_deposit sd where sd.consumer_no = :consumerNo and (sd.effective_start_date, sd.effective_end_date) OVERLAPS (:effectiveStartDate::DATE, :effectiveEndDate::DATE) order by sd.effective_start_date asc",nativeQuery=true)
public List<SecurityDepositInterface> findByConsumerNoAndEffectiveStartDateAndEffectiveEndDate(@Param("consumerNo") String consumerNo, @Param("effectiveStartDate") Date effectiveStartDate, @Param("effectiveEndDate") Date effectiveEndDate);
显示 java.lang.IllegalArgumentException: 名为 [effectiveStartDate] 的参数不存在
【问题讨论】:
标签: spring-data-jpa