title: How can i call a pl/sql function with hibernate or jpa?
body: <p>1.When I run the following command in order , I can get the result table:</p>
  
  <p>first  run</p>
  
  <pre><code>declare
  ref clpss2.pck_adapter_total.cursorType;
  begin
  ref := clpss2.pck_adapter_total.f_get_totals(13605);
  end;
  </code></pre>
  
  <p>then run</p>
  
  <pre><code>select * from clpss2.temp_totals;
  </code></pre>
  
  <p>the function is :</p>
  
  <pre><code>function f_get_totals(nPolDetailID in number)return cursorType
  is
  ref_cur cursorType;
  ...
  begin
     ...   
     open ref_cur for
     select * from clpss2.temp_totals where policy_detail_id=nPolDetailID;
     return ref_cur;
  end;
  </code></pre>
  
  <p>My question is : how can I call this function or store procedure using hibernate or JPA, (not JDBC)?
  Thanks in advance.</p>