Dynamic Sort on column with Alias name in query does not work

Wappler Version : 3.0.3
Operating System : Windows 10

Expected behavior

This issue seems to be only for queries that have at least 2 tables JOINED in the query and use at least 1 Alias

When you apply dynamic sorting on a table using a DB query, you expect it to work on all columns, even ones that you give an ‘Alias’ to in the query builder.

Actual behavior

When dynamic sorting is set up, it will only sort on the columns that DO NOT have an alias set up in the query builder.

Any column that you have given an Alias too will not work and will fail with following (extract) message:

order by \"call_types\".\"callName\" desc limit $1 - column call_types.callName does not exist\n at Parser.parseErrorMessage

Where call_types is the table name and “callName” is the Alias

How to reproduce

here is a snapshot of a sample query:

In this example, the sortable headers work fine for item # 3, work_group_id but all ones with an Alias will fail. If this query did not have a join, it would also work, even with the Alias

Community Page
Last updated: