From eb41602253f373fbe8d9eac42c9b998c8ea39745 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Wed, 14 Dec 2022 21:47:13 +0100 Subject: [PATCH] Fix --- src/de/steamwar/sql/SchematicNode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/sql/SchematicNode.java b/src/de/steamwar/sql/SchematicNode.java index 78fa24b..0680aba 100644 --- a/src/de/steamwar/sql/SchematicNode.java +++ b/src/de/steamwar/sql/SchematicNode.java @@ -50,7 +50,7 @@ public class SchematicNode { private static final Table table = new Table<>(SchematicNode.class); private static final Statement create = table.insertFields(true, "NodeOwner", "NodeName", "ParentNode", "NodeItem", "NodeType"); - private static final Statement update = table.insertAll(); + private static final Statement update = table.updateFields(new String[]{"NodeName", "ParentNode", "NodeItem", "NodeType", "NodeRank", "ReplaceColor", "AllowReplay", "NodeFormat"}, "NodeId"); private static final Statement delete = table.delete(Table.PRIMARY); private static final SelectStatement byId = table.select(Table.PRIMARY); @@ -447,7 +447,7 @@ public class SchematicNode { private void updateDB() { this.lastUpdate = Timestamp.from(Instant.now()); - update.update(nodeId, nodeOwner, nodeName, parentNode, lastUpdate, nodeItem, nodeType, nodeRank, replaceColor, allowReplay, nodeFormat); + update.update(nodeOwner, nodeName, parentNode, lastUpdate, nodeItem, nodeType, nodeRank, replaceColor, allowReplay, nodeFormat, nodeId); this.brCache.clear(); TAB_CACHE.clear(); }