This commit is contained in:
2021-03-31 01:54:36 +08:00
parent f84b396049
commit 81e899fceb
+1 -1
View File
@@ -144,7 +144,7 @@ class ActiveRecord extends BaseActiveRecord
* @return bool|static * @return bool|static
* @throws Exception * @throws Exception
*/ */
public static function updateOrCreate(array $condition, array $attributes = []): bool|static public static function createAndUpdate(array $condition, array $attributes = []): bool|static
{ {
if (empty($attributes)) { if (empty($attributes)) {
return \logger()->addError(FIND_OR_CREATE_MESSAGE, 'mysql'); return \logger()->addError(FIND_OR_CREATE_MESSAGE, 'mysql');