Fix batch insert monster cards

batch.add() clears all bindings, unlike vanilla JDBC
This commit is contained in:
P0nk committed 2023-08-04 15:38:14 +02:00
1 parent 02d4ff524a
commit e52f646558
1 file changed
+1 -1
@@ -36,8 +36,8 @@ public class MonsterCardDao {
VALUES (?, ?, ?)
ON CONFLICT (chr_id, card_id)
DO UPDATE SET level = excluded.level;""");
batch.bind(0, chrId);
cards.forEach(card -> {
batch.bind(0, chrId);
batch.bind(1, card.cardId());
batch.bind(2, card.level());
batch.add();