order by will be ignored
This commit is contained in:
parent
12d3e1f4ac
commit
d8e8474e1c
|
@ -125,6 +125,11 @@ func TestWithTableName(t *testing.T) {
|
|||
total, err = testEngine.OrderBy("count(`id`) desc").Count(CountWithTableName{})
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 2, total)
|
||||
|
||||
// the orderby will be ignored by count because some databases will return errors if the orderby columns not in group by
|
||||
total, err = testEngine.OrderBy("`name`").Count(CountWithTableName{})
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, 2, total)
|
||||
}
|
||||
|
||||
func TestCountWithSelectCols(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue