New query doesn't show up in the internal source for report, even after having restarted kexi Reproducible: Always Steps to Reproduce: 1.create a query, save it, close it 2.create a new report 3 Actual Results: .the new query is not in the combo of internal sources Expected Results: .the new query is in the combo of internal sources I had similar problem about one year ago with modified queries. It seems fixed. Unfortunately I am not at the last rev of Kexi. I did not succeed to install Neon-project, nor to compile from source. I hope I have more time in the future to try again
Happens if the query includes a field having the same name in 2 tables (the field used to have a relation) although the field name is correctly prefixed in the SQL view. This field can be used to build the query, but cannot be displayed.
Thanks Robert. As always, perfect details!
I've set the component to Queries as this is the place where the issue is manifested.
Robert, Staniek could anyone provide me example of such behaviour? :) By description I'm not sure if I understand it right and if I would be able to reproduce it correctly? :)
i tried reproduce it on latest master and everything worked. Please provide me more information or sample file to reproduce it
Created attachment 89254 [details] query liensidentite
Created attachment 89255 [details] query is available
Thanks @Robert!
Created attachment 89258 [details] SQL is incorrect
Created attachment 89259 [details] links disappeared
Created attachment 89260 [details] the query is no longer available
see the query liensidentite, attached this query is available (attachment) as internal source in reports I modify the query (through the gui) to display field liens.licleunik. The resulting SQL is incorrect (the field is not .prefixed, see attachment) and the links disappeared (see attachment) and the query is no longer available (attachment) for reports Suppressing the display of the incriminated field, and re-creating the links, the query is again available for reports I think that the chief bug is that the SQL doesn't capture the whole prefixed name when requested. Or perhaps shouldn't I use identical names in different tables ? (this is an heritage of the first BDD software I used (Windev). In such a case there should be some message to inform the user ?
@Robert in such cases please paste the original SQL statement as text here so we can test it.
when the query «liensidentite» is built through the gui the SQL is as follows <code>SELECT civilite, nom, prenom, courriel, tel, telmobil, adresse1, adresse2, codepays, code, commune, trilien, licleunik, idcleunik FROM lieide, identite, liens, localis, codecomm, pays WHERE (identite.idcleunik = lieide.idcleunik AND pays.pacleunik = codecomm.pacleunik AND codecomm.cocleunik = localis.cocleunik AND liens.licleunik = lieide.licleunik AND localis.locleunik = identite.locleunik) AND (identite.idcleunik = 3141 AND liens.licleunik = 1079) ORDER BY identite.nom The query is incorrect Both table "lieide" and "liens" have defined "licleunik" field. Use ".licleunik" notation to specify table name.</code> and the query is not available for reports the corrected query is SQL made as follows <code>SELECT civilite, nom, prenom, courriel, tel, telmobil, adresse1, adresse2, codepays, code, commune, trilien, lieide.licleunik, lieide.idcleunik FROM lieide, identite, liens, localis, codecomm, pays WHERE (identite.idcleunik = lieide.idcleunik AND pays.pacleunik = codecomm.pacleunik AND codecomm.cocleunik = localis.cocleunik AND liens.licleunik = lieide.licleunik AND localis.locleunik = identite.locleunik) AND (identite.idcleunik = 3141 AND liens.licleunik = 1079) ORDER BY identite.nom The query is correct</code> but the links are no longer present in the gui. to have an operational query available for reports one shall close kexi, reopen, fix the query, fix the report. This seems to occur only if one (at less) «field to be prefixed» is prsent in the SELECT statement
Issue until 2.8.6
Git commit c346e86c6765a542057ae3ee19e1622e98685eb1 by Jaroslaw Staniek. Committed on 22/01/2016 at 00:43. Pushed by staniek into branch 'calligra/2.9'. Kexi Query Designer: support queries having the same field name used in multiple tables FIXED-IN:2.9.11 M +2 -1 kexi/plugins/queries/kexiquerydesignerguieditor.cpp http://commits.kde.org/calligra/c346e86c6765a542057ae3ee19e1622e98685eb1
Created attachment 96777 [details] Simple test database, for the record See the query1: after the fix its SQL is "SELECT t1.b FROM t1, t2 WHERE t2.id = t1.a". Before the fix it is "SELECT b FROM t1, t2 WHERE t2.id = t1.a" what caused error because "b" isn't unique name.
Done, finally! Please test.
*** Bug 330512 has been marked as a duplicate of this bug. ***
Git commit 1bb1df8f9bc51fed8cd77d304623ae133bbfda8c by Jaroslaw Staniek. Committed on 29/02/2016 at 23:07. Pushed by staniek into branch 'master'. Query Designer: support queries having the same field name used in multiple tables FIXED-IN:2.9.11 (from calligra.git) M +2 -1 src/plugins/queries/kexiquerydesignerguieditor.cpp http://commits.kde.org/kexi/1bb1df8f9bc51fed8cd77d304623ae133bbfda8c