jpa - how to call oracle stored procedure in jpa2.0 which returns integer as out variable -
i have written 1 stored procedure return integer value. not able count in jpa. can 1 suggest me way call stored procedure , return out value variable in java using jpa. int count = 0; string id = "m123" count = getem().createnativequery("call sample_procedure(?,?)") .setparameter(1, id) .setparameter(2, count) .executeupdate(); stored procedure: have logic in procedure , inside loop incrementing count. create or replace procedure sample_procedure( id in varchar, count out number) ........ begin ..... loop --------- count := count + 1; looks similar answer options tried: tried curly braces before call statement. query q = entitymanager.createnativequery("{call sample_procedure(?,?)}").setparameter(1, inparam).setparameter(2, outparam); q.executeupdate(); it did not work. did not return output java class. tried this: query q = entitymanager.create...