//ads:
?>
cakephp 3 - Impossible to generate condition with empty list
PHP Snippet 1:
return $q->where(
['CategoriesStudents.category_id IN' =>
count($category_ids) > 0 ? $category_ids : [null])
]);