I'm trying to map a few entities based on the result of an oracle stored function that return a cursor.
My code looks like this:
this.getSession().createSQLQuery("{?=call my_pkg.my_func(:myPar1,:myPar2)}")
.addEntity(MyTargetClass.class)
.setParameter("myPar1",par1)
.setParameter("myPar2",par2)
.list();
With this code I get the following exception:
java.sql.SQLException: Missing IN or OUT parameter at index:: 3
How can I tell Hibernate that the missing parameter is a cursor?
According to this doc it should be possible, but there's no sample code as to actually invoke the function.