Important bug fixes for edit/commit (extended property check) (#294)

* Ensures that metadata is "extended" before creating a new row edit object
* Adds the commit handler to edit data service initialization calls
* Unit tests for the associated changes
This commit is contained in:
Benjamin Russell
2017-03-24 15:11:27 -07:00
committed by GitHub
parent d81fa347e5
commit 1909310a92
8 changed files with 46 additions and 4 deletions

View File

@@ -38,6 +38,11 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement
/// <param name="associatedMetadata">Metadata provider for the object to edit</param>
protected RowEditBase(long rowId, ResultSet associatedResultSet, EditTableMetadata associatedMetadata)
{
if (!associatedMetadata.HasExtendedProperties)
{
throw new ArgumentException(SR.EditDataMetadataNotExtended);
}
RowId = rowId;
AssociatedResultSet = associatedResultSet;
AssociatedObjectMetadata = associatedMetadata;