added code to update notes referencing stock items

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-16 13:23:14 +02:00
parent 5ca6e3c3b8
commit cfa5dd7ed1
7 changed files with 67 additions and 8 deletions

View File

@@ -203,7 +203,9 @@ CREATE TABLE IF NOT EXISTS "{0}" (
public Map<Long, Note> list(String module, String entityId) {
try {
var notes = new HashMap<Long, Note>();
var rs = select(ALL).from(TABLE_NOTES).where(MODULE,equal(module)).where(ENTITY_ID,equal(entityId)).exec(db);
var query = select(ALL).from(TABLE_NOTES).where(MODULE,equal(module));
if (entityId != null) query.where(ENTITY_ID,equal(entityId));
var rs = query.exec(db);
while (rs.next()) {
var note = Note.of(rs);
notes.put(note.id(),note);