Im using Hibernate as JPA provider and i have a problem calling a Oracle function/procedure from EntityManager.
First i used this way:
Query query = entityManager.createNativeQuery("SELECT PACKAGE.myFuncion(?1) FROM DUAL");
BigDecimal result = (BigDecimal) query.getSingleResult();
This works fine for function/procedure with no DML operations. (Only selects and process logic). But i need to call functions and procedures that perform DML sentences (insert, update, delete), i've tried with