From 3ea182fb4c12637474426158f42b2fb47643612a Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sat, 18 Aug 2018 18:29:13 +0200 Subject: [PATCH] Fixed return issues with store functions. --- src/main/java/nl/andrewlalis/model/database/Database.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/nl/andrewlalis/model/database/Database.java b/src/main/java/nl/andrewlalis/model/database/Database.java index e7c33e9..c4da185 100644 --- a/src/main/java/nl/andrewlalis/model/database/Database.java +++ b/src/main/java/nl/andrewlalis/model/database/Database.java @@ -123,7 +123,8 @@ public class Database { PreparedStatement stmt = this.connection.prepareStatement(sql); stmt.setInt(1, ta.getNumber()); stmt.setInt(2, teamId); - return stmt.execute(); + stmt.execute(); + return true; } catch (SQLException e) { e.printStackTrace(); return false; @@ -155,7 +156,8 @@ public class Database { stmt.setInt(1, student.getNumber()); stmt.setInt(2, teamId); stmt.setInt(3, student.getPreferredPartners().size() > 0 ? 1 : 0); - return stmt.execute(); + stmt.execute(); + return true; } catch (SQLException e) { e.printStackTrace(); return false;