Good night everybody … Here is some code :
$this->paginate = [ 'contain' => [ 'Categories', 'Users', 'Tags' => function($q) { return $q->select(['Tags.id', 'Tags.name'])->order(['Tags.name' => 'asc']); }, 'order' => ['Articles.name' => 'asc'], 'limit' => [50] ];
Tags are not sorted so what’s wrong ?
If you look at the generated query, is it right? If you add something like a ->limit(1), does that have an effect? (Not suggesting that as a “fix”, but as a way to tell whether it’s the order part that’s failing, or something deeper.)
->limit(1)
order
Thank you for replying.
Sorry, this list does not come from this method. It comes from an ajax call so that I have two lists ordered differently.
Sorry for wasting your time and thank you again. Often, when facing a problem, you end up not seing the right place.