working on journal

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-07-28 08:46:31 +02:00
parent e614880d71
commit 722a6ae97e
7 changed files with 120 additions and 40 deletions
@@ -476,7 +476,10 @@ public class SqliteDb extends BaseDb implements StockDb {
var rs = insertInto(TABLE_ITEMS, OWNER, OWNER_NUMBER, Field.CODE, NAME, DESCRIPTION, LOCATION_ID)
.values(item.owner().dbCode(), number, item.code(), item.name(), item.description(), item.location().id())
.execute(db).getGeneratedKeys();
if (rs.next()) item.id(rs.getLong(1)).ownerNumber(number);
if (rs.next()) {
item.setId(rs.getLong(1));
item.ownerNumber(number);
}
rs.close();
} catch (SQLException e) {
throw failedToStoreObject(item.name()).causedBy(e);