By means of the QGIS 3.16.3 I have created a GeoPackage with two layers, a point layer and a polygon layer.
The point layer is named "pt", with attributes: geometry, sN, sE, sS, sW, uuid
.
The polygon layer is named "crown", with attributes: geometry, pt_uuid
.
I can add a point to "pt" or a polygon to "crown", but cannot save the layer edits. I get the following error:
Could not commit changes to layer pt Errors: ERROR: 1 feature(s) not added. Provider errors: OGR error creating feature -35: failed to prepare SQL: INSERT INTO "pt" ( "geometry", "sN", "sE", "sS", "sW", "uuid") VALUES (?, ?, ?, ?, ?, ?)
Does anyone know what I am doing wrong?
uuid
is the 'unique' identifier. Is it actually unique? If it is not, then writing will fail. Perhaps the features you are adding are attempting to use a value that has already been used.