I would like to pass an SQL ARRAY
to Native query as Parameter.
I was able to pass SQL Array to Stored Procedure successfully.
But I can't get the same thing to work with normal native SELECT
statement.
I am using JPA 2.5, Eclipse Link, Oracle DB.
I want to go for this approach as
- SQL Statement has limit of 1000 parameters for
IN
clause. - JPA Native Query does not support passing
LIST
as a parameter toNamedNativeQuery
. Using SQL Array it can be directly written in a query as:
select * from order where customer_id in (select column_value from TABLE ( ?param_arr_customer_ids ) )