Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: DarrenDickens on October 12, 2017, 10:02:17 pm
-
If I create an SQL query under Edit-->"Search in Model" it gets loaded into the "My Searches" list. If I run the query then I get the results in the bottom pane. I can click on any column heading to sort the results on that column heading (with an up arrow icon at the far right of the column heading), clicking again reverses the sort order (now with a down arrow). All pretty normal stuff just like in Windows Explorer, nice.
My question is "How do I turn the ordering off and revert back to the ORDER BY ordering mentioned in my SQL query"? Clicking the column heading a 3rd time does not turn that ordering off. If I close my EA project and open another one and run my query the clicked column is remembered and the up/down arrow is shown. This is getting a bit annoying since I had my SQL with a nice ORDER BY ordering that is no longer being obeyed.
Thanks
Darren
-
Probably you send a bug report/feature request. Happens to system where there is no style guide for GUIs.
q.
-
Bug report/feature request sent to Sparx. I'll keep this thread posted on any outcome.
-
Sparx have confirmed this is a bug. I am using build 1214. Sparx have confirmed the bug is now logged to be fixed (implying that the bug exists in the current EA build 1351). Sparx have provided the workaround below. I have confirmed that it does work.
- To restore the ORDER BY (part of the original SQL query) sort order add an extra field in the SELECT <fields> FROM … in the SQL query, re-run the SQL query (click "Yes" to save the search), now remove the extra field, re-run the SQL query (click "Yes" to save the search - it should now be back as your original SQL query).
Note, the extra field can be anything valid, I managed to just add a ", 1" (without the quotes) to the end of <fields> before the FROM clause.
Hope this helps someone else in the future.
Darren
-
Thanks Darren, quite a funny workaround it is :)
Geert
-
Just thought I'd chip in on why that workaround works.
EA saves a column layout associated with each search. That includes column order, visibility, widths and sort settings. As soon as the number of columns changes that whole layout is invalidated.