public function hasMany($model, $their_field = null, $our_field = null, $as_field = null)
    {
        if (!$our_field) {
            $our_field = $this->id_field;
        }
        if (!$their_field) {
            $their_field = ($this->table).'_id';
        }
        /** @type SQL_Many $rel */
        $rel = $this->add('SQL_Many', $as_field ?: $model);
        $rel->set($model, $their_field, $our_field);

        return $rel;
    }