Skip to content

Commit 74039ea

Browse files
committed
Fix MssqlUpsertAssembler and HsqldbUpsertAssembler
1 parent c0467bb commit 74039ea

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doma-core/src/main/java/org/seasar/doma/jdbc/dialect/HsqldbUpsertAssembler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public void assemble() {
7070
}
7171
buf.cutBackSql(2);
7272
}
73+
buf.appendSql(";");
7374
}
7475

7576
private void excludeQuery() {
@@ -79,11 +80,11 @@ private void excludeQuery() {
7980
buf.appendSql(", ");
8081
}
8182
buf.cutBackSql(2);
82-
buf.appendSql(") as ");
83+
buf.appendSql(")) as ");
8384
excludeAlias();
8485
buf.appendSql(" (");
8586
for (Tuple2<EntityPropertyType<?, ?>, InParameter<?>> insertValue : insertValues) {
86-
buf.appendParameter(insertValue.component2());
87+
column(insertValue.component1());
8788
buf.appendSql(", ");
8889
}
8990
buf.cutBackSql(2);

doma-core/src/main/java/org/seasar/doma/jdbc/dialect/MssqlUpsertAssembler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void assemble() {
6969
}
7070
buf.cutBackSql(2);
7171
}
72+
buf.appendSql(";");
7273
}
7374

7475
private void excludeQuery() {
@@ -78,11 +79,11 @@ private void excludeQuery() {
7879
buf.appendSql(", ");
7980
}
8081
buf.cutBackSql(2);
81-
buf.appendSql(") as ");
82+
buf.appendSql(")) as ");
8283
excludeAlias();
8384
buf.appendSql(" (");
8485
for (Tuple2<EntityPropertyType<?, ?>, InParameter<?>> insertValue : insertValues) {
85-
buf.appendParameter(insertValue.component2());
86+
column(insertValue.component1());
8687
buf.appendSql(", ");
8788
}
8889
buf.cutBackSql(2);

0 commit comments

Comments
 (0)