Getting outputParameterValue from Stored procedure

While we can run a stored procedure as follows,

EntityManager em = persistence.getEntityManager();
    em.getDelegate().createStoredProcedureQuery("processSalarySheet_sp")
            .setParameter("month",month)
            .execute();

how can we get the getOutputParameterValue?
.getOutputParameterValue("salaryAmount") .getOutputParameterValue("taxAmount")

https://wiki.eclipse.org/EclipseLink/Release/2.5/JPA21#OUT_parameter_Example

Thanks. I should use a delegate, right?

StoredProcedureQuery storedProcedure = em.getDelegate().createStoredProcedureQuery("sales_tax");

Yes, get need to get the delegate, because CUBA’s EntityManager doesn’t have method to create StoredProcedureQuery.

1 Like