mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-31 01:25:42 -05:00
Fix for rowId not decrementing if reverting an create row (#1560)
* Decrement NextRowId if reverting addition of a row that is not committed yet. * added test and message * added fixed and extensive tests * added assert messages
This commit is contained in:
@@ -380,6 +380,12 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(rowId), SR.EditDataUpdateNotPending);
|
||||
}
|
||||
|
||||
// Remove the increment of the NextRow ID if we're reverting a CreateRow, as we are not actually adding a row.
|
||||
if (typeof(RowCreate) == removedEdit.GetType())
|
||||
{
|
||||
NextRowId--;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user