Fix: Database.AddEntry() 插入记录后,没有将 SQLite 自动生成的 ID 回填到 meta.Id 上

This commit is contained in:
2026-05-22 20:55:13 +08:00
parent d705d47b34
commit 33e1a758ef
+2 -1
View File
@@ -166,7 +166,8 @@ public static class Database
);
";
connection.Execute(sql, meta);
int newId = connection.ExecuteScalar<int>(sql + "; SELECT last_insert_rowid();", meta);
meta.Id = newId;
return true;
}
catch (Exception)