Skip to content

fix_for_reverse_order_with_functions #8741

wants to merge 2 commits into from

4 participants

joxxoxo commented Jan 4, 2013

fix for reverse_sql_order using regexp (for details of bug see pull request #8225)

shemerey commented Jan 9, 2013

unfortunately it doesn't work properly you could try next:

id asc, MAX(IFNULL(1,0), owned_essay_id)


 id DESC, 
 MAX(IFNULL(1,0), owned_essay_id) DES


id DESC,
joxxoxo commented Jan 10, 2013

@shemerey fair point, i had an error in the regexp. fixed

JonRowe commented Jul 1, 2013

Did this ever go anywhere? Is it still an issue for active record 4?

shemerey commented Jul 1, 2013

yep it's still issue for active record

@cgag cgag referenced this pull request in bogdan/datagrid Sep 4, 2013

Fix calls to order_unsupported. #77

@sgrif sgrif was assigned by rails-bot Oct 20, 2015
Ruby on Rails member
sgrif commented Oct 30, 2015

Thanks, but we've rejected similar PRs in the past. We do not want to end up having to parse the SQL here, as it's slow and error prone. reorder exists for these cases.

@sgrif sgrif closed this Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.