What are some common practices for creating queries with a dynamic number of
parameters in the IN clause?
SELECT e FROM ENTITY e WHERE e.id IN (?1, ?2, ..., ?n)
Is there any possible way to create a named query for this scenario? It
seems that this is might be a fairly common scenario that would be ideal if
JPA could handle. I've considered several options (ex: using dynamic
queries, creating multiple named queries with different numbers of
parameters, etc.), but none of them are optimal.