diff --git a/src/main/java/DAO/AccountDAO.java b/src/main/java/DAO/AccountDAO.java index 22a939d..f0112af 100644 --- a/src/main/java/DAO/AccountDAO.java +++ b/src/main/java/DAO/AccountDAO.java @@ -47,9 +47,12 @@ public Account findAccountByUsername(String username) { ResultSet rs = ps.executeQuery(); if (rs.next()) { + int account_id = (int) rs.getLong(1); String usernameFromDB = rs.getString(2); String password = rs.getString(3); - return new Account(usernameFromDB, password); + Account account = new Account(usernameFromDB, password); + account.setAccount_id(account_id); + return account; } } catch (SQLException e) { e.printStackTrace();