I've been trying to figure out how to take an input of a list of enums for my sql query. This is what it looks like:
@Query(value = "Select * from employees where city in :cities", nativeQuery = true)
List<Employee> findByCities(@Param("cities") List<City> cities);
I understand that for simple queries we can rely on the JPA Criteria API but I want to know if I can actually do it this way instead. Because if so, i can create more complicated queries (such as joins with another table) if I could have this flexibility of specifying the list.