public function getWithAssociation($associationIndex, $associatedId)
    {
        $oConfig = Factory::service('Config');
        $oConfig->load('blog/blog');

        $associations = $oConfig->item('blog_post_associations');

        if (!isset($associations[$associationIndex])) {
            return [];
        }

        $oDb = Factory::service('Database');
        $oDb->select('post_id');
        $oDb->where('associated_id', $associatedId);
        $posts = $oDb->get($associations[$associationIndex]->target)->result();

        $ids = [];
        foreach ($posts as $post) {
            $ids[] = $post->post_id;
        }

        if (empty($ids)) {
            //  No IDs? No posts.
            return [];
        }

        $oDb->where_in($this->tableAlias . '.id', $ids);

        return $this->getAll();
    }