Fix batch insert monster cards

batch.add() clears all bindings, unlike vanilla JDBC
This commit is contained in:
P0nk
2023-08-04 15:38:14 +02:00
parent 02d4ff524a
commit e52f646558

View File

@@ -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();