protected function ensureModel()
    {
        Yii::trace('Model ensuring', __METHOD__);

        if ($this->multiple) {
            if (empty($this->model) || !is_array($this->model)) {
                $this->model = [$this->model];
            }
            foreach ($this->model as $model) {
                $this->ensureModelInternal($model);
            }

            return;
        }

        $this->ensureModelInternal($this->model);
    }