public function getModelName() { if ($this->isExternal()) { return $this->getRawTableName(); } else { return parent::getModelName(); } }