Java SpringDataJPA:如何查询日期列表?
我需要一个SpringDataJPA(Postgresql)查询来搜索Java SpringDataJPA:如何查询日期列表?,java,spring-data-jpa,Java,Spring Data Jpa,我需要一个SpringDataJPA(Postgresql)查询来搜索java.util.Date值的列表。我的第一次查询尝试是: List<PricingCoreViewEntity> findByProductIdAndEffectiveDateIn( String productId, @Temporal(TemporalType.DATE) List<Date> effectiveDates, Sort orderBy); List fi
java.util.Date
值的列表。我的第一次查询尝试是:
List<PricingCoreViewEntity> findByProductIdAndEffectiveDateIn(
String productId, @Temporal(TemporalType.DATE) List<Date> effectiveDates, Sort orderBy);
List findByProductIdAndEffectiveDateIn(
字符串productId,@Temporal(TemporalType.DATE)List effectiveDates,排序依据);
但这不起作用,因为列表
不是时间性的,而是列表
中的日期。那我还能怎么写呢?TIA。只需删除注释,它是不需要的。为什么需要添加注释?我只是假设我添加了注释。我们总是使用注释进行查询。它不需要吗?是的,没有它它应该可以工作。@Islam Muhammad你是对的,它确实可以工作!!你应该回答,这样我才能接受投票。谢谢非常欢迎:)