Hello,
this code leeds to an error:
$query = Team::find();
$query->orderBy('name');
$dbList = $query->all();
Error:
Why there is a grouping here? looks like a bug…
Thanks,
Urkman
Hello,
this code leeds to an error:
$query = Team::find();
$query->orderBy('name');
$dbList = $query->all();
Error:
Why there is a grouping here? looks like a bug…
Thanks,
Urkman
Hi,
Hm, your code is a simple and common case, and I think is well tested.
Maybe you have overridden find() method in your Team model?
T.
You are right, I was wrong with the code. The error was caused by a count() after the orderBy Clause:
$count = $query->count();
But I think, that count() should ignore the orderBy…
Greetings,
Urkman