You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use composition relations in my project using QGIS 3.34 and PostgreSQL 15 tables but it didn't work
my setup: several postgres tables, one with geometries, several others without, referencing the table with the geometries via foreign keys
my observation: for multiple composition relationships referencing the same parent, only the first composition is taken into account when duplicating/deleting an object from the parent layer.
2024-01-19_10-51-23_qgis_bug_report.mp4
in 3.28 compositions don't work at all
the nightly-dev build behaves exactly like 3.34
@nirvn could you take a look at it? it seems like you worked on compositions in the past #53965
Cheers
Steps to reproduce the issue
create the following database:
CREATE EXTENSION IF NOT EXISTS "postgis";
CREATE TABLE IF NOT EXISTS parent(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
geom geometry(LineString, 4326) NOT NULL,
description text
);
CREATE TABLE IF NOT EXISTS child_1(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
parent_id integer REFERENCES parent(id) ON DELETE CASCADE ON UPDATE CASCADE,
description text
);
CREATE TABLE IF NOT EXISTS child_2(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
parent_id integer REFERENCES parent(id) ON DELETE CASCADE ON UPDATE CASCADE,
description text
);
CREATE TABLE IF NOT EXISTS child_3(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
parent_id integer REFERENCES parent(id) ON DELETE CASCADE ON UPDATE CASCADE,
description text
);
INSERT INTO parent (geom, description) VALUES ('LINESTRING(20.735 42.2126, 20.736 42.2127)', 'parent 1');
INSERT INTO parent (geom, description) VALUES ('LINESTRING(20.736 42.2127, 20.737 42.2128)', 'parent 2');
INSERT INTO parent (geom, description) VALUES ('LINESTRING(20.737 42.2128, 20.738 42.2129)', 'parent 3');
INSERT INTO child_1 (parent_id, description) VALUES (1, 'child 1');
INSERT INTO child_1 (parent_id, description) VALUES (2, 'child 2');
INSERT INTO child_1 (parent_id, description) VALUES (2, 'child 3');
INSERT INTO child_1 (parent_id, description) VALUES (3, 'child 4');
INSERT INTO child_1 (parent_id, description) VALUES (3, 'child 5');
INSERT INTO child_1 (parent_id, description) VALUES (3, 'child 6');
INSERT INTO child_2 (parent_id, description) VALUES (1, 'child a');
INSERT INTO child_2 (parent_id, description) VALUES (2, 'child b');
INSERT INTO child_2 (parent_id, description) VALUES (2, 'child c');
INSERT INTO child_2 (parent_id, description) VALUES (3, 'child d');
INSERT INTO child_2 (parent_id, description) VALUES (3, 'child e');
INSERT INTO child_2 (parent_id, description) VALUES (3, 'child f');
INSERT INTO child_3 (parent_id, description) VALUES (1, 'child i');
INSERT INTO child_3 (parent_id, description) VALUES (2, 'child ii');
INSERT INTO child_3 (parent_id, description) VALUES (2, 'child iii');
INSERT INTO child_3 (parent_id, description) VALUES (3, 'child iv');
INSERT INTO child_3 (parent_id, description) VALUES (3, 'child v');
INSERT INTO child_3 (parent_id, description) VALUES (3, 'child vi');
What is the bug or the crash?
Hello,
I tried to use composition relations in my project using QGIS 3.34 and PostgreSQL 15 tables but it didn't work
my setup: several postgres tables, one with geometries, several others without, referencing the table with the geometries via foreign keys
my observation: for multiple composition relationships referencing the same parent, only the first composition is taken into account when duplicating/deleting an object from the parent layer.
2024-01-19_10-51-23_qgis_bug_report.mp4
in 3.28 compositions don't work at all
the nightly-dev build behaves exactly like 3.34
@nirvn could you take a look at it? it seems like you worked on compositions in the past #53965
Cheers
Steps to reproduce the issue
Versions
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: