Bug report #16902
GPKG table referenced by Id instead of layername
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Data Provider/OGR | ||
Affected QGIS version: | 2.18.10 | Regression?: | No |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24801 |
Description
When you load a geopackage layer via Add Vector Layer, the table is referenced by it's ID
See Layer source in the layer properties, General Tab: my_gpkg.gpkg|*layerid*=8
This is an issue, because if one does a vacuum on the Geopackage, the layerid might change. In this case, your entire project might loose all layer references.
==
Contextual info: if you do: save layer as a geopackage, then the new added layer is referenced correctly by the tablename in the layer properties, general tab section: my_gpkg.gpkg|*layername*=my_layername
History
#1
Updated by Emmanuel BELO about 7 years ago
https://github.com/cmangeat should have a look at this issue next week, if we can provide a PR.
#2
Updated by Christophe Mangeat about 7 years ago
I was adviced to have a look at https://github.com/qgis/QGIS/pull/4341 wich could have been a good basis for investigation (related issue, e.g.).
Didn't find a an angle of attack so far.
#3
Updated by Even Rouault almost 7 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
This has been fixed in QGIS master per 1822b76c1a69418e44d7a1186e16f54d670267ad