There are 3 orderBy methods available for EntityFieldQuery. All support ordering ASC or DESC (ascending or descending), much like the orderBy method of SelectQuery. However, quite unlike SelectQuery it doesn't default to ASC but requires you to enter a direction. This is silly. I have spoken with chx and bojanz and both agree that it is silly and adding a default of ASC to those methods would harm nothing but improve DX.
Let's do that. :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 903698.patch | 1.06 KB | bojanz |
| #16 | entityfieldquery-OrderByASC.patch | 1.05 KB | jpstrikesback |
| #6 | 903698.patch | 1.06 KB | buzzybron |
| #3 | 903698.patch | 0 bytes | buzzybron |
| #1 | entityfieldquery-OrderByASC.patch | 1.05 KB | jpstrikesback |
Comments
Comment #1
jpstrikesback commentedHow's this?
Comment #2
jpstrikesback commentedComment #3
buzzybron commentedDid the patch. I guess it is the same as jpstrikesback.
Virgin patch. Please let me know if anything is wrong at all. Thank you!
Comment #4
buzzybron commentedPardon, this should be correct file. Please ignore previous empty patch file.
Comment #5
bojanz commented#1 is green, and matches the EntityFieldQuery behavior with the SelectQuery behavior.
RTBC.
Comment #6
buzzybron commentedComment #7
bojanz commentedSo, #1.
Comment #9
bojanz commentedComment #10
sun#6: 903698.patch queued for re-testing.
Comment #11
sunShould use single quotes.
Powered by Dreditor.
Comment #12
bojanz commentedOnce again, #1 is RTBC. And it has single quotes (sun, you're looking at the wrong patch).
Comment #14
bojanz commentedI really want every patch after #1 to disappear.
Comment #15
bojanz commentedCalling #1 trivial would be an overstatement.
Comment #16
jpstrikesback commentedhere it is again, same as the patch in #1 :P
Comment #17
jpstrikesback commentedComment #18
jpstrikesback commentedComment #19
bojanz commentedNo longer applies, here's a reroll.
Comment #20
webchickThis seems like a straight-forward oversight in the API, and doesn't break anything.
Committed to HEAD. Thanks!