true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']], [['type_id'], 'exist', 'skipOnError' => true, 'targetClass' => ApplicationType::class, 'targetAttribute' => ['type_id' => 'id']], ]; } public function getUser(): \yii\db\ActiveQuery { return $this->hasOne(User::class, ['id' => 'user_id']); } public function getApplicationType(): \yii\db\ActiveQuery { return $this->hasOne(ApplicationType::class, ['id' => 'type_id']); } }