public function addViaIds($ids, $defaultData = [])
    {
        if (!$ids) {
            return true;
        }
        foreach ($ids as $key => $id) {
            $id = is_array($id)
                ? $id
                : [reset($this->relationAttribute) => $id];
            $ids[$key] = array_merge($id, $this->condition, $defaultData);
        }
        MigrationHelper::insertUpdate($this->viaTable, array_keys(reset($ids)), $ids);
    }