since 3.5.0 useGeneratedKey skeyProperty must be specified, the global setting useGeneratedKey could be deleted

MyBatis version

3.x.x

Database vendor and version

Test case or example project

Steps to reproduce

Expected result

Actual result

Comment From: harawata

Hello @kaixinwangzi1982 ,

I'm not sure what you mean. If we removed the global useGeneratedKeys, users may have to specify useGeneratedKeys for each statement explicitly. If I am missing something, please elaborate.

Comment From: kaixinwangzi1982

Hi @harawata , I ' m using the version of 3.5.15 mybatis, and the global setting was setted。 @Insert({ "insert into account_cancel (id, userId, ", "createTime)", "values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, ", "#{createTime,jdbcType=TIMESTAMP})" }) int insert(AccountCancel record); if I want to get the id, @Options(useGeneratedKeys = true, keyProperty = "id") must be written? I have to specify useGeneratedKeys for each statement explicitly. Is there any other simple implementation?

Comment From: harawata

Thank you for the explanation, @kaixinwangzi1982 .

It is true that specifying the global useGeneratedKeys has no benefit for annotation users. For XML mappers, however, it is still useful. So, we will not remove the global useGeneratedKeys.