Skip to content

Commit b3d0002

Browse files
committed
#42 - Polishing.
Obtain generated ID value only once.
1 parent 341c796 commit b3d0002

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: src/main/java/org/springframework/data/r2dbc/convert/MappingR2dbcConverter.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,7 @@ private boolean potentiallySetId(Row row, RowMetadata metadata, PersistentProper
580580

581581
if (columns.contains(idColumnName)) {
582582
generatedIdValue = row.get(idColumnName);
583-
}
584-
585-
if (columns.size() == 1) {
583+
} else if (columns.size() == 1) {
586584

587585
String key = columns.iterator().next();
588586
generatedIdValue = row.get(key);

0 commit comments

Comments
 (0)