1

Here is the query that I'm trying to get to work on Spring 4 with Hibernate and JPA. How do you write a query for SELECT IN?

@Query("SELECT d FROM DaybookCalendar d WHERE uuid IN ? ")
public List<DaybookCalendar> findByUuids(List<String> calendarIds);
Thom
  • 14,013
  • 25
  • 105
  • 185
  • You may need to generate the bind placeholders (`?`) dynamically. See for example [this post](http://stackoverflow.com/questions/3107044/preparedstatement-with-list-of-parameters-in-a-in-clause). – Mick Mnemonic Aug 10 '15 at 17:07
  • Might also be that JPA allows passing in the `List` directly. See [Adding IN clause to JPA query](http://stackoverflow.com/questions/4378824/adding-in-clause-list-to-a-jpa-query) – Mick Mnemonic Aug 10 '15 at 17:11

0 Answers0