mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
[mssql] Ignore unset attributes when changing attribute values, adding features
This commit is contained in:
parent
0943631342
commit
963f08c863
@ -1202,6 +1202,9 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList &flist, Flags flags )
|
||||
if ( fld.name().isEmpty() )
|
||||
continue; // invalid
|
||||
|
||||
if ( attrs.at( i ).userType() == qMetaTypeId< QgsUnsetAttributeValue >() )
|
||||
continue;
|
||||
|
||||
if ( mDefaultValues.contains( i ) && mDefaultValues.value( i ) == attrs.at( i ).toString() )
|
||||
continue; // skip fields having default values
|
||||
|
||||
@ -1300,6 +1303,9 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList &flist, Flags flags )
|
||||
if ( fld.name().isEmpty() )
|
||||
continue; // invalid
|
||||
|
||||
if ( attrs.at( i ).userType() == qMetaTypeId< QgsUnsetAttributeValue >() )
|
||||
continue;
|
||||
|
||||
if ( mDefaultValues.contains( i ) && mDefaultValues.value( i ) == attrs.at( i ).toString() )
|
||||
continue; // skip fields having default values
|
||||
|
||||
@ -1554,6 +1560,9 @@ bool QgsMssqlProvider::changeAttributeValues( const QgsChangedAttributesMap &att
|
||||
if ( fld.name().isEmpty() )
|
||||
continue; // invalid
|
||||
|
||||
if ( it2.value().userType() == qMetaTypeId< QgsUnsetAttributeValue >() )
|
||||
continue;
|
||||
|
||||
if ( mComputedColumns.contains( fld.name() ) )
|
||||
continue; // skip computed columns because they are done server side.
|
||||
|
||||
@ -1593,6 +1602,9 @@ bool QgsMssqlProvider::changeAttributeValues( const QgsChangedAttributesMap &att
|
||||
if ( fld.name().isEmpty() )
|
||||
continue; // invalid
|
||||
|
||||
if ( it2.value().userType() == qMetaTypeId< QgsUnsetAttributeValue >() )
|
||||
continue;
|
||||
|
||||
if ( mComputedColumns.contains( fld.name() ) )
|
||||
continue; // skip computed columns because they are done server side.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user