title: How can I call Oracle stored procedure which has one out parameter as sysrefcursor using Hibernate?
body: <p>Here is my stored procedure which has one out parameter:</p>
  
  <pre><code>create or replace
  PROCEDURE CITYMST_LIST 
  (
   P_CURSOR OUT sys_refcursor
    ,CMPID IN NUMBER
  , STSTATUS IN NUMBER  
  
  ) AS 
  BEGIN
    OPEN P_CURSOR FOR
    SELECT * FROM city_master WHERE citycmp_id=CMPID AND city_status=STSTATUS;
  END CITYMST_LIST;
  </code></pre>
  
  <p>In my hbm configuration I have mapped stored procedure: </p>
  
  <pre><code>&lt;sql-query name="CITYMST_LIST" callable="true"&gt;
      &lt;return  class="CityMaster"&gt;
      &lt;/return&gt;
      { ? = call CITYMST_LIST(?,?) }
  
  &lt;/sql-query&gt;
  
  I have also tried : 
      { call CITYMST_LIST(?,?) }
  </code></pre>
  
  <p>Here is my java code : </p>
  
  <pre><code>    Query query = session.getNamedQuery("CITYMST_LIST");
      query.setParameter("CMPID",Cmpid);
      query.setParameter("STSTATUS",true);
      list = query.list();
  </code></pre>