This commit is contained in:
2021-01-12 18:39:53 +08:00
parent f488a14d5b
commit c8a4c3bead
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -193,11 +193,13 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
/**
* @param $param
* @param $db
* @return $this
* @throws
* @param null $db
* @return static
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/
public static function findOne($param, $db = NULL): static
public static function findOne($param, $db = NULL): mixed
{
if (is_numeric($param)) {
$primary = static::getColumns()->getPrimaryKeys();