改名
This commit is contained in:
@@ -417,8 +417,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
$trance->commit();
|
$trance->commit();
|
||||||
$lastId = $this->setPrimary($lastId, $param);
|
$lastId = $this->setPrimary($lastId, $param);
|
||||||
|
|
||||||
var_dump($lastId);
|
|
||||||
|
|
||||||
$this->event->dispatch(self::AFTER_SAVE, [$attributes, $param]);
|
$this->event->dispatch(self::AFTER_SAVE, [$attributes, $param]);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$trance->rollback();
|
$trance->rollback();
|
||||||
@@ -497,6 +495,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$this->event->dispatch(self::BEFORE_SAVE, [$this])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static::getDb()->enablingTransactions();
|
static::getDb()->enablingTransactions();
|
||||||
[$attributes, $condition, $param] = $this->filtration_and_separation();
|
[$attributes, $condition, $param] = $this->filtration_and_separation();
|
||||||
if (($primary = $this->getPrimary()) !== null) {
|
if (($primary = $this->getPrimary()) !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user