Skip to content

Commit 056e749

Browse files
authored
Remove unnecessary processing for retrieving the value of the auto-increment column (#1193)
This fix is related to #1191.
2 parents f389a80 + 09b3a5e commit 056e749

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doma-core/src/main/java/org/seasar/doma/jdbc/query/AutoInsertQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private void assembleUpsertSql(PreparedSqlBuilder builder, Naming naming, Dialec
190190

191191
@Override
192192
public void generateId(Statement statement) {
193-
if (generatedIdPropertyType != null && idGenerationConfig != null) {
193+
if (isAutoGeneratedKeysSupported()) {
194194
entity =
195195
generatedIdPropertyType
196196
.postInsert(

doma-core/src/main/java/org/seasar/doma/jdbc/query/AutoMultiInsertQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private void assembleUpsertSql(PreparedSqlBuilder builder, Naming naming, Dialec
200200

201201
@Override
202202
public void generateId(Statement statement) {
203-
if (generatedIdPropertyType != null && idGenerationConfig != null) {
203+
if (isAutoGeneratedKeysSupported()) {
204204
List<ENTITY> newEntities =
205205
generatedIdPropertyType.postInsert(entityType, entities, idGenerationConfig, statement);
206206
if (entities.size() == newEntities.size()) {

0 commit comments

Comments
 (0)