I have an oracle function which returns an array of integers for which a type has been written at database. Code is as follows :
create or replace type my_ids is table of number;
By looking at the examples present online I am trying to call that function but it is always saying
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
Here is code snippet which I tried:
@Entity
@Table(name = "My_Table")
@NamedStoredFunctionQuery(name = "get_ids", functionName = "my_function",
parameters =
{
@StoredProcedureParameter(name = "batch_size", queryParameter = "batch_size", type = Long.class)
},
returnParameter = @StoredProcedureParameter(mode = ParameterMode.OUT , name= "my_ids" , queryParameter = "my_ids" , jdbcType = OracleTypes.ARRAY))
public class MyEntity implements Serializable {
//Fields
//
}
By analyzing the error I am getting, I know there is some problem with defining returnParameter but I am not sure what exactly I am missing. Please help me with the code. Thanks