aatuc210
aatuc210

Reputation: 1868

Spring Data JPA: How to query a list of dates?

I need a Spring Data JPA (Postgresql) query that searches for a List of java.util.Date values. My first attempt at the query was this:

List<PricingCoreViewEntity> findByProductIdAndEffectiveDateIn(
            String productId, @Temporal(TemporalType.DATE) List<Date> effectiveDates, Sort orderBy);

But that doesn't work because List is not temporal, it's the dates within the List that are. So how else can I write this? TIA.

Upvotes: 0

Views: 328

Answers (1)

Islam Hassan
Islam Hassan

Reputation: 712

Just remove the annotation, it's not needed.

Upvotes: 1

Related Questions