title: Mybatis selectKey not returning sequence value
body: <p>I'm using the below insert query in mybatis. In ibatis, the same query returned seq_consumer_id.nextval to the calling method in java, and inserted the same into the consumer_id column. But in mybatis, return value of the method is always 1 (I'm assuming its the no of rows inserted), though consumer_id column is correctly updated from sequence. Can't we generate the key, insert it and return the same to java class in mybatis ?</p>
  
  <pre><code>&lt;insert id="insertConsumer" parameterType="com.enrollment.vo.ConsumerVO"&gt;
              &lt;selectKey keyProperty="id" resultType="int" order="BEFORE"&gt;
                  select seq_consumer_id.nextval as id from dual
              &lt;/selectKey&gt;
                      insert into quotation_consumer (consumer_id, consumer_type, dob,  
                      create_date, ENROLLMENT_INDICATOR, QUOTE_ID,IS_PRIMARY) 
                      values(#{id},#{type.id}, #{birthdate, jdbcType=DATE}, default, #{enrollmentIndicator}, 
                      #{quoteId},#{isPrimary})
  
          &lt;/insert&gt;
  </code></pre>