Bug 331259

Summary: Table name forcibly added in generated SQL when not needed
Product: [Applications] KEXI Reporter: Jarosław Staniek <staniek>
Component: QueriesAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.8 beta3   
Target Milestone: 2.8   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In: 2.8.0
Sentry Crash Report:
Attachments: Test database

Description Jarosław Staniek 2014-02-17 22:17:31 UTC
Queries like "SELECT id_t1 FROM t2" become "SELECT t2.id_t1 FROM t2" after save.

Reproducible: Always

Steps to Reproduce:
1. Open the attached test database.
2. Create query "SELECT id_t1 FROM t2" in the SQL view, save it; "q8" is such a query already created.
3. Close the view, reopen it in SQL view.

Actual Results:  
The query becomes "SELECT t2.id_t1 FROM t2"

Expected Results:  
No changes should are needed here.

Fixing this issue would reduce number of unexpected changes Kexi makes to definitions created by the user.
Comment 1 Jarosław Staniek 2014-02-17 22:22:04 UTC
Created attachment 85205 [details]
Test database
Comment 2 Jarosław Staniek 2014-02-20 10:27:00 UTC
Git commit 05639c4e7c885b4d4e1016c96156838ef8079974 by Jaroslaw Staniek.
Committed on 17/02/2014 at 22:23.
Pushed by staniek into branch 'master'.

Do not add tablename in a generated SQL when not needed

M  +12   -5    libs/db/connection.cpp

http://commits.kde.org/calligra/05639c4e7c885b4d4e1016c96156838ef8079974
Comment 3 Jarosław Staniek 2014-02-20 10:27:25 UTC
Git commit 4f1f67623d438bfca7d5a917fda3aab7dd681d00 by Jaroslaw Staniek.
Committed on 17/02/2014 at 22:23.
Pushed by staniek into branch 'calligra/2.8'.

Do not add tablename in a generated SQL when not needed
REVIEW:115855

M  +12   -5    libs/db/connection.cpp

http://commits.kde.org/calligra/4f1f67623d438bfca7d5a917fda3aab7dd681d00