InsertOrUpdateChange saves ID on insert

main
Inga 🏳‍🌈 14 years ago
parent 3932523d04
commit 6daac40d29
  1. 7
      Common/actions/InsertOrUpdateChange.cs

@ -66,11 +66,14 @@ namespace FLocal.Common.actions {
foreach(KeyValuePair<string, AbstractFieldValue> kvp in this.dataToInsert) { foreach(KeyValuePair<string, AbstractFieldValue> kvp in this.dataToInsert) {
processedData[kvp.Key] = kvp.Value.getStringRepresentation(); processedData[kvp.Key] = kvp.Value.getStringRepresentation();
} }
Config.instance.mainConnection.insert( this.id = int.Parse(Config.instance.mainConnection.insert(
transaction, transaction,
this.tableSpec, this.tableSpec,
processedData processedData
); ));
if(processedData.ContainsKey(this.tableSpec.idName)) {
this.id = int.Parse(processedData[this.tableSpec.idName]);
}
} }
} }

Loading…
Cancel
Save