8000 Many-to-Many relations have stopped working since 3.42 · Issue #61621 · qgis/QGIS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Many-to-Many relations have stopped working since 3.42 #61621
Open
@Aeshna314

Description

@Aeshna314

What is the bug or the crash?

Many-to-Many relations have stopped working as of (I think) 3.42. These are relations I have had set up and working in projects for many years, they are not newly made ones.

Relations are set up in the standard way with a pivot table containing only the foreign keys.

Where ids used to be added without error in the pivot table, they now get the wrong data type for attribute fk_id of feature -20: Got QString, expected int it's attempting to use the string 'autogenerate' instead of the id.

To be clear, this is not about sqlite increment, it's on the new child object the error occurs, not on an unsaved parent object.

I've tried playing around with the data sources settings - transaction modes, evaluating default values - but no setting makes any difference.

I've also tried (just in case) with the id of the child feature layer set to defaults like sqlite_fetch_and_increment, coalesce("id",max("id")+1), and other such workarounds, to no avail.

The weird thing is that even with the id field set to coalesce("id",max("id")+1) as default, it still tries to save it as 'autogenerate', which seems really wierd because it has no business sending that code when the default is coalesce("id",max("id")+1)...

Steps to reproduce the issue

  1. Create a many-to-many relation with pivot table (I'm using sqlite)
  2. Add parent, child and pivot tables to project
  3. Set relations between parent>pivot, and child>pivot
  4. Add child relation widget to parent layer form
  5. Open parent layer form, attempt to add child feature

Versions

QGIS version3.42.1-Münster
QGIS code branchRelease 3.42
 
Libraries
Qt version5.15.16
Python version3.13.2
GDAL version3.10.2
PROJ version9.6.0
EPSG Registry database versionv12.004 (2025-03-02)
GEOS version3.13.0-CAPI-1.19.0 (Compiled)
3.13.1-CAPI-1.19.2 (Running)
SQLite version3.49.1
PDAL version2.8.3
PostgreSQL client version17.2
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionManjaro Linux
 
Active Python plugins
TomBio3.4.4
pluginbuilder33.2.1
db_manager0.1.20
processing2.12.99
grassprovider2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

I can't be absolutely sure when this stopped working, but I completed a project with one such layer working flawlessly a month ago, so it must be recent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!RegressionSomething which used to work, but doesn't anymoreRelations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0