<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">Hi All,<div><br /></div><div>As a mostly shape/tab file user, I've been attempting to experiment with spatialite dbs a bit recently, and am starting to get a bit more used to them. I'm hitting a problem with splitting objects though, and wondered if this annoyance counted as a bug?</div><div><br /></div><div>If I have a spatialite layer and split an object, that's fine. But when I save the layer I get a "Could not commit changes to layer LayerName" banner. If I press "Show more" then I get something like this:</div><div>_____</div><div><p style="margin:0px;">Could not commit changes to layer layername</p>
<p style="margin:0px;"><br /></p>
<p style="margin:0px;">Errors: SUCCESS: 1 geometries were changed.</p>
<p style="margin:0px;"> SUCCESS: 1 attribute value(s) changed.</p>
<p style="margin:0px;"> ERROR: 4 feature(s) not added.</p>
<p style="margin:0px;"> </p>
<p style="margin:0px;"> Provider errors:</p>
<p style="margin:0px;"> SQLite error: UNIQUE constraint failed: LayerName.pkuid</p>
<p style="margin:0px;"> SQL: INSERT INTO "layername"("geometry","pkuid","Code","Lith","Description","Quality","code1","lith1","description1","quality1") VALUES (ST_Multi(GeomFromWKB(?, 28351)),?,?,?,?,?,?,?,?,?)</p>
<p style="margin:0px;">____</p><p style="margin:0px;"><br /></p><p style="margin:0px;">I'm not populaing the pkuid data, so I think QGIS is auto filling this.</p><p style="margin:0px;">I think that what's happening is that when QGIS splits the feature both new parts have the same pkuid number. Certainly if I go in manually and change the field I can save without errors.</p><p style="margin:0px;">
If QGIS is auto filling this column, ought it not be handling the splitting case too?</p><p style="margin:0px;"><br /></p><p style="margin:0px;">Thoughts?</p><p style="margin:0px;">-ramon.</p></div></body></html>