I have an oracle function defined as:
FUNCTION SELECTINBOX (FA_FROMUSERLIKE IN PKGSMSTYPES.MAXVARCHAR2_T DEFAULT NULL ,
FA_INBOXOWNER IN PKGSMSTYPES.MAXVARCHAR2_T,
FA_A_URGENCY IN G_INTARRAY_TBL DEFAULT NULL ,
FA_PAGENO IN NUMBER DEFAULT 1
) RETURN G_SMSNOTES_TBL;
where G_INTARRAY_TBL is defined as,
create or replace
TYPE G_INTARRAY_TBL AS TABLE OF NUMBER;
I am building the query using eclipselink. The query works fine if I hardcode G_INTARRAY_TBL as null in the query string but if I try to pass a List of BigDecimals to it, I get an error,
Internal Exception: java.sql.SQLException: Invalid column type
Error Code: 17004
Include your code for your query.
You need to use a PLSQLStoredFunctionCall (@NamedPLSQLStoredFunctionQuery) for this. You also need to mirror the PLSQL TABLE type with a VARRAY type.
See,
http://wiki.eclipse.org/EclipseLink/Examples/JPA/PLSQLStoredFunction