Pasar el tipo TABLE definido por el usuario a la función de Oracle almacenada

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 

preguntado el 08 de noviembre de 11 a las 17:11

1 Respuestas

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.

Véase, http://wiki.eclipse.org/EclipseLink/Examples/JPA/PLSQLStoredFunction

respondido 15 nov., 11:23

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.