public function linkByKeys($relation, $keys, $removeKeys = null)
    {
        if ($relation->via !== null) {
            $this->linkJunctionByKeys($relation, $keys, $removeKeys);
        } else {
            $this->linkDirectByKeys($relation, $keys, $removeKeys);
        }
    }