From 5eb0947ce2dd81875198b8c60f9a718068c6dc6e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 May 2023 17:59:08 +0200 Subject: [server] DB: Make .lastInsertId() actually work It's unused currently so never mattered, but better be safe for the future. :-) --- .../src/main/java/org/openslx/bwlp/sat/database/MysqlStatement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/MysqlStatement.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/MysqlStatement.java index a5d0f49d..23c43497 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/MysqlStatement.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/MysqlStatement.java @@ -41,7 +41,7 @@ public class MysqlStatement implements Closeable { } } this.query = query; - this.statement = con.prepareStatement(query.sql); + this.statement = con.prepareStatement(query.sql, Statement.RETURN_GENERATED_KEYS); } public String getQuery() -- cgit v1.2.3-55-g7522