/** * @return $this */ public function findbyPk($condition) { $primaryKey = ProfileField::primaryKey(); if (isset($primaryKey[0])) { $condition = [$primaryKey[0] => $condition]; } return $this->andWhere($condition); }