query->findAll(); $taskIds = array_column($tasks, 'id'); $tags = $this->taskTagModel->getTagsByTasks($taskIds); array_merge_relation($tasks, $tags, 'tags', 'id'); return $tasks; } }