Skip to content

inconsistant behaviour between element query selectors like groupBy() vs orderBy() #9881

Answered by brandonkelly
bencresty asked this question in Ideas
Discussion options

You must be logged in to vote

Can look into adding field handle support to groupBy down the road, but for now this is working as expected. We added field handle support to orderBy since it is much much more commonly needed than groupBy. I’d consider groupBy to be a bit more of an advanced feature that requires a stronger understanding of how SQL works, whereas orderBy is more accessible to more developers.

This is prone to errors, as the selectors not using handles, but column names, don't work anymore when db column names 'randomly' or intentionally change.

To ease your concerns here, column names will be consistent across all environments, and will not change over time, except in one single scenario: when you have…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
Comment options

You must be logged in to vote
1 reply
@brandonkelly
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
2 participants
Converted from issue

This discussion was converted from issue #9871 on September 26, 2021 03:15.