I am trying to get update record primary key using this way in MyBatis(v3.5.1):
<update id="updateForFreeSeat"
parameterType="com.sportswin.soa.room.model.entity.RoomSeat"
useGeneratedKeys="true"
keyProperty="id"
keyColumn="id">
update r_room_seat
set status = 1
where room_play_id = #{roomPlayId,jdbcType=BIGINT}
limit 1
</update>
and the Mapper.java define like this:
int updateForFreeSeat(RoomSeat roomSeat);
And now I get update record id failed, the id is my primay key.This is my debug output:
what should I do to get update record's id?