asObject($this->returnType)->where($this->primaryKey, $uid)->first(); } protected function setEntity($entity) { if ($entity->hasChanged()) { if (!$this->save($entity)) { throw new \Exception(__FUNCTION__ . " 오류 발생.\n" . var_export($this->errors(), true)); } } return $entity;; } protected function getEntitys(): array { return $this->asObject($this->returnType)->findAll(); } }