working on journal
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user