P粉1240704512023-09-02 11:48:11
I recommend using EntityManager#createStoredProcedureQuery
like this:
StoredProcedureQuery query = em.createStoredProcedureQuery("voucherRedemption"); query.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN); query.registerStoredProcedureParameter(2, String.class, ParameterMode.IN); query.registerStoredProcedureParameter(3, String.class, ParameterMode.IN); query.setParameter(1, loggedinWorkSpaceId); query.setParameter(2, startDate); query.setParameter(3, endDate); List<Object[]> results = query.getResultList();
I haven't used it to get actual results, just executed a process. If this works, please let me know.