How to use the Postgres any-clause with JPA/Hibernate native queries (array parameters)
So we've got a whole lot of Postgres SQL queries stored in files and used from PHP. The task is to replace PHP with Java. We want to reuse as much of the queries "as is" to keep the migration path short. I can't get the Array parameters to work. Here's a query example: update user_devices set some_date = now() where some_id in ( select distinct some_id from user_devices where user_id = any(:userIDs) and device_id = any(:deviceIDs) and exists (select 1 from users where user_id = any(:userIDs) and customer_id = :customerID) ); Note the "any" clauses, which cause the problem, because they expect