ActiveRecord\HasMany::get_foreign_key_for_new_association PHP Method

get_foreign_key_for_new_association() private method

Get an array containing the key and value of the foreign key for the association
private get_foreign_key_for_new_association ( activerecord\Model $model ) : array
$model activerecord\Model
return array
    private function get_foreign_key_for_new_association(Model $model)
    {
        $this->set_keys($model);
        $primary_key = Inflector::instance()->variablize($this->foreign_key[0]);
        return array($primary_key => $model->id);
    }