Bug report #10850

self referencing relations are not working

Added by zicke - about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Matthias Kuhn
Category:Relations
Affected QGIS version:2.4.0 Regression?:No
Operating System:Ubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19222

Description

Self referencing relations (= same layer for referencing layer and referenced layer) are not working. QGIS eats 100% CPU. Debug output:

src/core/qgsrelation.cpp: 177: (getRelatedFeaturesRequest) Filter conditions: '"id" = '
src/gui/attributetable/qgsattributetablemodel.cpp: 41: (QgsAttributeTableModel) entered.
src/gui/attributetable/qgsattributetablemodel.cpp: 288: (loadLayer) entered.
src/core/qgsrelation.cpp: 177: (getRelatedFeaturesRequest) Filter conditions: '"id" = '
src/gui/attributetable/qgsattributetablemodel.cpp: 41: (QgsAttributeTableModel) entered.
src/gui/attributetable/qgsattributetablemodel.cpp: 288: (loadLayer) entered.
src/core/qgsrelation.cpp: 177: (getRelatedFeaturesRequest) Filter conditions: '"id" = '
src/gui/attributetable/qgsattributetablemodel.cpp: 41: (QgsAttributeTableModel) entered.
src/gui/attributetable/qgsattributetablemodel.cpp: 288: (loadLayer) entered.
src/core/qgsrelation.cpp: 177: (getRelatedFeaturesRequest) Filter conditions: '"id" = '
src/gui/attributetable/qgsattributetablemodel.cpp: 41: (QgsAttributeTableModel) entered.
src/gui/attributetable/qgsattributetablemodel.cpp: 288: (loadLayer) entered.
...
...

Test project is attached.

relations.zip (7.45 KB) zicke -, 2014-07-08 09:52 AM

Associated revisions

Revision b1a2bef1
Added by Matthias Kuhn almost 6 years ago

[relation widgets] General update

  • Improve speed (lazy loading)
  • Loop detection for circular dependencies (Fix #10850)
  • Some memory leaks fixed
  • More const-correctness
  • Fix the attribute editor context

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Category set to Relations

#2 Updated by Matthias Kuhn almost 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF