Fix: Database.AddEntry() 插入记录后,没有将 SQLite 自动生成的 ID 回填到 meta.Id 上
This commit is contained in:
@@ -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;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|||||||
Reference in New Issue
Block a user