Opened 15 years ago

Closed 15 years ago

#1884 closed bug (fixed)

addFeatures don't work for SpatiaLite layer

Reported by: alexbruy Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.2.0
Component: Data Provider Version: Trunk
Keywords: spatialite, addFeatures Cc: a.furieri@…
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: no

Description

Seems that addFeatures method of SpatiaLite data provider don't work. I try to copy all features from shapefile to empty SpatiaLite layer with help of simple plugin and have no result. Fetures don't adds.

I run same plugin but with both shapefiles and all work fine.

Tested on Windows XP Pro SP3 with QGIS 1.2.0 (qgis-dev package, versions up to 1.2.0-25) and QGIS 1.1 obtained from OSGEO4W installer .

Sample plugin with all necessary data attached. In archive there is shapefile, empty SpatiaLite database and simple plugin which copied fetures from shapefile to database

Attachments (1)

convertor.zip (202.8 KB ) - added by alexbruy 15 years ago.
Plugin and data for testing

Download all attachments as: .zip

Change History (3)

by alexbruy, 15 years ago

Attachment: convertor.zip added

Plugin and data for testing

comment:1 by pcav, 15 years ago

Cc: a.furieri@… added

comment:2 by jef, 15 years ago

Resolution: fixed
Status: newclosed

fixed in r11438

Although that doesn't fix problems in your data model/plugin. You have several columns with NOT NULL constraints on them and don't assign any values. You also have a primary key column, that you don't initialize.

If you have an own primary key, you need to initialize it.

Note: See TracTickets for help on using tickets.