diff --git a/Common/actions/InsertOrUpdateChange.cs b/Common/actions/InsertOrUpdateChange.cs index 998350f..8f3b9c1 100644 --- a/Common/actions/InsertOrUpdateChange.cs +++ b/Common/actions/InsertOrUpdateChange.cs @@ -66,11 +66,14 @@ namespace FLocal.Common.actions { foreach(KeyValuePair kvp in this.dataToInsert) { processedData[kvp.Key] = kvp.Value.getStringRepresentation(); } - Config.instance.mainConnection.insert( + this.id = int.Parse(Config.instance.mainConnection.insert( transaction, this.tableSpec, processedData - ); + )); + if(processedData.ContainsKey(this.tableSpec.idName)) { + this.id = int.Parse(processedData[this.tableSpec.idName]); + } } }