You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the same dataset from #36167 with a slightly different join configuration (see the second image) inserting a new feature "ogc_fid" 0 is not recognized as a constraint violation even if a feature with "ogc_fid" 0 is already present in the database table, the expected behavior is to see the orange cross with the unique constraint violation tooltip.
The text was updated successfully, but these errors were encountered:
elpaso
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
Jun 4, 2020
assuming that inside QGIS we consider fid values as:
< 0: FID_IS_NEW new features that are not yet committed to the data provider
>= 0 features that exist in the data provider
this means that 0 is not FID_NULL but a valid fid value for a not new feature, but the constructor of QgsFeature defaults feature id to 0 which leads to this bug.
I believe it should construct new features with a default of FID_NULL.
The QgsFeature default constructors initialized
feature id to 0, which is a valid feature id
instead of initializing it fo FID_NULL.
This was just wrong and broke the validator for
UNIQUE constraints in case a feature with fid 0
existed in the data provider.
Fixesqgis#36962
Using the same dataset from #36167 with a slightly different join configuration (see the second image) inserting a new feature "ogc_fid"
0
is not recognized as a constraint violation even if a feature with "ogc_fid"0
is already present in the database table, the expected behavior is to see the orange cross with the unique constraint violation tooltip.The text was updated successfully, but these errors were encountered: