Bug report #15599
In spatial views, QGIS shows only 100 rows in attribute-table, when view has more than 100 objects
|Affected QGIS version:||3.0.0||Regression?:||No|
|Operating System:||win||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23522|
In spatial views, created with SQL-Statement in dbmanager, attribute-table shows errors and wrong results, when view contains more then 100 objects. Save the view as shape, attribute-table has the correct attributes.
Virtual layer, generated with SQL-Statement shows attribute-table also correct.
QGIS project, spatialite db and shape are attached
Tested itwith 2.14, 2.16 and master
#2 Updated by Gerhard Spieles almost 3 years ago
- File view_parent_child_all_manualy_write_in_views_geometry_colums.jpg added
- Description updated (diff)
- Subject changed from In spatial views, QGIS shows wrong content in attribute-table, when view has more than 100 objects to In spatial views, QGIS shows only 100 rows in attribute-table, when view has more than 100 objects
- File dbmanager_writes_in_metadata_geometriecolums.jpg added
- File spatialite_view_show_right_result_in_attrribute_table_after_filterdelete_.jpg added
- File spatialite_view_show_only_100_features_in_attrribute_table_.jpg added
Behavior is also in master and 2.18.13.
The View "parent_child_object_equal_101", is generated with dbmanager. In DB Manager, section table shows 101 elements. Load the view in QGIS result in Feature count "0", attribute table shows 100 Elements, filtered 100. (s. screenshot).
Go to right click on the loaded view, select filter and click on the "delete filter" button, click "OK" button, actualize the feature count to "101" and the attribute table shows now the correct number of rows (101) (s, screenshot).
Analyzing the problem in the database with spatialite-gui shows, that dbmanager writes the entries for views in the section metadata, geometry_columns in the database.
This seems to corresponded with the issue #15600.
The select feature highlights the wrong objects.
Under metadata, in the database exist a section "views_geometry_columns". I deleted the entry created from db manager in the section "metadata, geometry_columns" for the view "view_parent_child_all" and
write the entry manually in the section "views_geometry_columns" and load this view in qgis.
In this view, the select feature highlights the right objects.
The feature count is correct an shows 267 rows, but in the attribute table a filter is set to the maximum numbers of features in the parents table (153) and it is not possible to delete this filter (s. screenshot).
Save this view as shape brings correct results (267 geometries and 267 attribute table rows with correct content).
#3 Updated by Giovanni Manghi almost 3 years ago
- Affected QGIS version changed from 2.14.5 to 2.18.13
- Status changed from Open to Feedback
Does it happens only when the query involved has a join in it?
Can you add the exact steps (queries and where you issued them... qgis or spatialite-gui?)? thanks.