title: How to return Id insert stored procedure + mybatis
body: <p>I have a stored procedure that return an ID (sql server 2005):</p>
  
  <pre><code>BEGIN
      INSERT INTO 
        rolTemplateWeek(rolWeek,employee,date_insert) 
        VALUES(@numberRol,@employeeId,getDate())
     Select @id = @@IDENTITY
  END
  </code></pre>
  
  <p>Mapper.xml</p>
  
  <pre><code>    &lt;insert  id="saveRol" parameterType="com.service.specual.dto.RolWeek" statementType="CALLABLE"&gt;
      { call saveRolWeek(
          #{numberRol,javaType=Integer,jdbcType=INTEGER,mode=IN},
          #{employeeId,javaType=Integer,jdbcType=INTEGER,mode=IN},
          #{id,javaType=Integer,jdbcType=INTEGER,mode=OUT}
      )}
  &lt;/insert&gt;
  </code></pre>
  
  <p>RolWeek.class</p>
  
  <pre><code>    public class RolWeek {
  
      private int id;
          private int numberRol;
      private int employeeId;
          .... get &amp; setters
  </code></pre>
  
  <p>Mapper.java</p>
  
  <pre><code>   RolWeek rolWeek= new RolWeek ();
     rolWeek.setNumberRol(120);
     rolWeek.setEmployeeId(100);
  
     public int saveServiceRolWeek(RolWeek rolWeek);
  </code></pre>
  
  <p>Insert fine but not return my ID , only "1" ¿how I could return my inserted ID?</p>