Bug 376970 - Adding table relationships in Query Designer using drag&drop does not work
Summary: Adding table relationships in Query Designer using drag&drop does not work
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Queries (show other bugs)
Version: 3.0.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: 3.0.1
Assignee: Jarosław Staniek
URL: https://forum.kde.org/viewtopic.php?f...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-26 22:55 UTC by Jarosław Staniek
Modified: 2017-03-05 22:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2017-02-26 22:55:12 UTC
Adding relationships in Query Designer using drag&drop does not work:

1. Start the query designer
2. Add two or more tables
3. Drag a field from one table and drop onto a matching field from another table

Expected: Relationship is added between the tables.

Current bug: No effect

It's a regression compared to 2.9.x.
Comment 1 Jarosław Staniek 2017-02-26 22:57:10 UTC
Workaround: add new relations in the SQL still works (using WHERE tableX.fieldX = tableY.fieldY). 

By the way, the issue only relates to using drag and drop and does not affect queries that are already saved: existing relationships show and work.
Comment 2 Jarosław Staniek 2017-03-05 21:58:32 UTC
Git commit ad31a455b097e811c833bf149d7b997929b0d9a7 by Jaroslaw Staniek.
Committed on 05/03/2017 at 21:57.
Pushed by staniek into branch '3.0'.

Fix adding table relationships in Query Designer using drag&drop (regression since 3.0)

Summary:
FIXED-IN:3.0.1
T5473

Note: the code in form view has been updated too but because (like in 2.9.x) autofields are disabled it's still not functional.

Test Plan: Create a new query design, insert 2 or more tables, add relation using drag and drop, add fields to the query. Move to the data view and SQL view. Expected: correct data result, SQL is present with WHERE condition.

Reviewers: piggz

Reviewed By: piggz

Tags: #kexi

Differential Revision: https://phabricator.kde.org/D4913

M  +1    -1    src/core/CMakeLists.txt
M  +2    -4    src/core/kexidragobjects.cpp
M  +6    -4    src/plugins/forms/kexiformview.cpp
M  +4    -6    src/plugins/queries/kexiquerydesignerguieditor.cpp
M  +2    -10   src/widget/relations/KexiRelationsTableContainer_p.cpp

https://commits.kde.org/kexi/ad31a455b097e811c833bf149d7b997929b0d9a7
Comment 3 Jarosław Staniek 2017-03-05 22:06:07 UTC
Git commit a4b56fa7f4db246ddba0ecdc72fa0527225fd95c by Jaroslaw Staniek.
Committed on 05/03/2017 at 22:04.
Pushed by staniek into branch 'master'.

Merge branch '3.0'


Fix adding table relationships in Query Designer using drag&drop (regression since 3.0)

Summary:
FIXED-IN:3.0.1
T5473

Note: the code in form view has been updated too but because (like in 2.9.x) autofields are disabled it's still not functional.

Test Plan: Create a new query design, insert 2 or more tables, add relation using drag and drop, add fields to the query. Move to the data view and SQL view. Expected: correct data result, SQL is present with WHERE condition.

Reviewers: piggz

Reviewed By: piggz

Tags: #kexi

Differential Revision: https://phabricator.kde.org/D4913

M  +1    -1    src/core/CMakeLists.txt
M  +2    -4    src/core/kexidragobjects.cpp
M  +6    -4    src/plugins/forms/kexiformview.cpp
M  +4    -6    src/plugins/queries/kexiquerydesignerguieditor.cpp
M  +2    -10   src/widget/relations/KexiRelationsTableContainer_p.cpp

https://commits.kde.org/kexi/a4b56fa7f4db246ddba0ecdc72fa0527225fd95c