SQL would look something like this:
WHERE email IN (' foo@yahoo.com ', ' bar@gmail.com ')
Unfortunately, I do not know how to do this. If you do this using raw SQL, you need to do this in two steps: create a binding parameter ? for each value in the set, then iterate over the set and bind each value to its binding parameter.
I don't know how to do this in JPA, but this is what you should be looking for.
source share