Bug 330512 - Altering SQL wipes all links between the tables of the query
Summary: Altering SQL wipes all links between the tables of the query
Status: CLOSED DUPLICATE of bug 340056
Alias: None
Product: KEXI
Classification: Applications
Component: Queries (show other bugs)
Version: 2.7.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.9.11
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 18:36 UTC by robert leleu
Modified: 2016-01-23 10:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.9.11


Attachments
data file (1.83 MB, application/octet-stream)
2014-06-30 13:37 UTC, robert leleu
Details
data file on july 3d (1.83 MB, application/octet-stream)
2014-07-03 16:19 UTC, robert leleu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert leleu 2014-01-28 18:36:59 UTC
Links disappear

Reproducible: Always

Steps to Reproduce:
1.Display a query, clic SGL, modify the SQL check OK
2.Clic data. The result is displayed (it's OK)
3.Clic design = the links between the tables have disappeared

Actual Results:  
4. If you try to close the query Kexi hangs, and you've to kill it.

Expected Results:  
Links should stay
Comment 1 robert leleu 2014-05-18 19:52:28 UTC
I had the opportunity to clarify (using the neon kexi)

If a database includes identical field names in 2 tables, one shall use the table name to prefix the field to be used, in order to have an operational query, assigning a value to one such field. Once the SQL statement is recognized as correct one can click "data", see the result, and export. One can also change the requested value by typing the new one into the SQL statement.
But if you click design the links between the tables have disappeared. Draw them again, change requested value, save, show data, export is in error, and shows a SQL without the prefixes.

Should I change the names of fields in order not to have the same field name in two tables ?
Comment 2 robert leleu 2014-06-30 12:05:59 UTC
using last neon version

I  just notice that when the links are not present in the design of a query this query is no longer available in the list of internal sources for reports.
Once the links have been re-drawn, (and the query and the report closed and re-opened), the query is again available in the list.

In the hope it helps
Comment 3 Jarosław Staniek 2014-06-30 12:28:27 UTC
@Robert thanks, this just looks complicated at the moment... any idea how to reproduce that? And is that directly related to this bug?
Comment 4 robert leleu 2014-06-30 13:37:48 UTC
Created attachment 87491 [details]
data file
Comment 5 robert leleu 2014-06-30 13:39:02 UTC
Comment on attachment 87491 [details]
data file

Open attached kexi file "adresses 1.kexi"
Open report "enveloppe_identitia5italbas", the report is empty
Click "design" there is no internal source, and the query "listeadresses" doesn't show in the list of internal sources.
Open query "listeadresses", there is a message 

"Object could not be opened in 
Data View.
Do you want to open it in Text View? "

click "open", you see the incorrect query. Correct it by adding "identite." 
before the last argument of SELECT , check query and save. Close the 2 windows. 

Open "enveloppe_identitia5italbas" it shows datas, although in design mode 
there is no internal source. However "listeadresses" is available in the list, 
and can be assigned to the report.

Close Kexi, open, anything is OK.

I scrutinize my next uses of kexi trying to spot how it switches to the 
degraded situation.
Comment 6 robert leleu 2014-07-03 16:19:16 UTC
Created attachment 87528 [details]
data file on july 3d
Comment 7 robert leleu 2014-07-03 16:38:49 UTC
Here the detailed bug manifestation with attachment for July 3d, which shows a connection between the «links» bug and the «query» one.

Open query listeadresses in data mode
Modify to select one idcleunik, for instance 3168, save, click data anything's OK
Open report enveloppe_identitea5italbas : the report is empty
Open it in design mode, the relevant query, listeadresses is not present (nor in the combo)
Close report
Check query in design mode, it's OK, close the query
Open the query (in data) it's impossible, you are requested to open in SQL. Indeed the SQL is erroneous (idcleunik is not prefixed). Correct, save.
Open report, it's OK
Back to the query in design mode the links are no longer there.
Suppress the selection, draw the links, save, open in data OK
Comment 8 robert leleu 2014-07-05 13:49:08 UTC
I just checked once more.

The unavailability of a query in the report internal source combo is strictly linked to the fact that this query is «SQL» erroneous.

So there is no bug related to reports. Only a bug when the prefixed notation disappears (and sometimes ? always ?) take away the links between the tables
Comment 9 Jarosław Staniek 2016-01-22 20:48:16 UTC
340056 resolved yesterday and seems this is the same bug. Good!
Please test if you can in Kexi 2.9.11.

*** This bug has been marked as a duplicate of bug 340056 ***
Comment 10 robert leleu 2016-01-23 10:44:14 UTC
Thanks for having solved, but unfortunately I'm not able to check.
Since neon disappeared I have not been able to compile Kexi (I hope I find time to try again), and have to wait for new kexi release by ubuntu
Comment 11 Jarosław Staniek 2016-01-23 10:50:41 UTC
I understand. Many Linux users have the deployment issue. Maybe we'll have to find funds for preparing independent packages. Maybe after the Windows release.

Stay tuned.