wocommunity / wonder

Project Wonder
http://wiki.wocommunity.org/
239 stars 166 forks source link

Fix error paginating queries containing the DISTINCT clause on SQL Server #983

Closed hprange closed 2 years ago

hprange commented 2 years ago

The application throws an exception when building queries with pagination for SQL Server if the query has no ORDER BY clause and the DISTINCT clause is present. This fix takes only the first column name of the query to build an ORDER BY clause.

darkv commented 2 years ago

@hprange Hi Henrique, does it still make sense to cherry pick this to Wonder6?

hprange commented 2 years ago

@darkv Nah. Don't worry about that. If someone needs it in Wonder 6, they will shout. I removed the Wonder 6 label.