title: Return value from Oracle function using Mybatis
body: <p>I have looked at a number of StackOverflow questions on this issue but can't find one that makes any sense.   <a href="https://stackoverflow.com/questions/35174108/how-to-call-oracle-function-in-mybatis">This one</a> comes closest but doesn't show how to get the return value from the function.</p>
  
  <p>Here's my mapper call:</p>
  
  <pre><code>public Long callMyFunction(@Param("recordId") Long recordId, @Param("otherId") Long otherId, @Param("date") Date date, @Param("comments") String comments);
  </code></pre>
  
  <p>Here's the mapper XML:    </p>
  
  <pre><code>&lt;select id="callMyFunction" parameterType="map" statementType="CALLABLE"  resultType="java.lang.Long"&gt;
      {  #{resultId,javaType=java.lang.Long,jdbcType=NUMERIC,mode=OUT} = call MYSCHEMA.MYPACKAGE.my_function(
      #{recordId,jdbcType=NUMERIC,mode=IN},
      #{otherId,jdbcType=NUMERIC,mode=IN},
      #{date,jdbcType=DATE,mode=IN},
      #{comments,jdbcType=VARCHAR,mode=IN})}
  &lt;/select&gt;
  </code></pre>
  
  <p>The call works, but the return value (resultId) is always null.</p>
  
  <p>Can anybody spot the problem?  </p>