We're updating the issue view to help you get more done. 

query.sort() should return a new query, not adjust the original query


See http://blog.adamcameron.me/2017/04/cfml-lucee-13-v-4-14-v-6-coldfusion-we.html

The member function Query.sort() should not modify the original query, it should return a new sorted query. It makes sense for the function version of this - querySort - to adjust the query inline, but it doesn't make sense for it to do this with the member functions.

If Lucee followed ColdFusion here and the member function returned a pointless boolean then it'd make sense to change the source object, but that's not how your sort member function has been implemented.

I guess it could be legit to say that changing the original query is purposeful "sideways compat" with CF, and the fact that it also returns the same query is just a "bonus" for Lucee devs (cos that's how CF shoulda done it in the first place). If so... feel free to just close this as "nah, not worth it".




Michael Offner


Adam Cameron

Affects versions