Hi devs,

I use qgis 3.4.5 with windows 7 64bit.

I build a qgsvectorlayer like this :
uri = qgis.core.QgsDataSourceUri()
uri.setDatabase('a_sqlite_file')
uri.setDataSource('', 'SELECT * FROM MyTable', 'geom'
,'','the_pk_column_name')
vlayer = qgis.core.QgsVectorLayer(uri.uri(), tablename, 'spatialite')

When I ask the id of the features in vlayer ([fet.id() for fet in
vlayer.getFeatures()]), it returns the value of the first column of
'MyTable', and not the value of the 'the_pk_column_name' column...

it was working in 2.18. Could you confirm it is a regression and not a
normal behaviour ?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to