Skip to content

Commit de9bd7d

Browse files
authored
Merge pull request #1198 from harawata/unset-keyproperty-default
Unset default value of keyProperty.
2 parents c92b65a + 65b9458 commit de9bd7d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/apache/ibatis/annotations/Options.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2016 the original author or authors.
2+
* Copyright 2009-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ public enum FlushCachePolicy {
5858

5959
boolean useGeneratedKeys() default false;
6060

61-
String keyProperty() default "id";
61+
String keyProperty() default "";
6262

6363
String keyColumn() default "";
6464

src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void parseStatement(Method method) {
303303
boolean useCache = isSelect;
304304

305305
KeyGenerator keyGenerator;
306-
String keyProperty = "id";
306+
String keyProperty = null;
307307
String keyColumn = null;
308308
if (SqlCommandType.INSERT.equals(sqlCommandType) || SqlCommandType.UPDATE.equals(sqlCommandType)) {
309309
// first check for SelectKey annotation - that overrides everything else

0 commit comments

Comments
 (0)