src/Leevel/Database/Ddd/Entity.php
public function flush()
    {
        if (!$this->leevelFlush || true === $this->leevelFlushed) {
            return;
        }

        try {
            $result = call_user_func_array($this->leevelFlush, $this->leevelFlushData);
        } catch (ReplaceException $e) {
            if (false === $this->leevelReplace) {
                throw $e;
            }

            $this->leevelFlush = null;
            $this->leevelFlushData = null;
            $this->updateReal($this->leevelReplace);
            $this->leevelReplace = false;

            return $this->flush();
        }

        $this->leevelFlush = null;
        $this->leevelFlushData = null;
        $this->leevelFlushed = true;

        $this->handleEvent(static::AFTER_SAVE_EVENT);

        return $result;
    }
public function flush()
    {
        if (!$this->leevelFlush || true === $this->leevelFlushed) {
            return;
        }

        try {
            $result = call_user_func_array($this->leevelFlush, $this->leevelFlushData);
        } catch (ReplaceException $e) {
            if (false === $this->leevelReplace) {
                throw $e;
            }

            $this->leevelFlush = null;
            $this->leevelFlushData = null;
            $this->updateReal($this->leevelReplace);
            $this->leevelReplace = false;

            return $this->flush();
        }

        $this->leevelFlush = null;
        $this->leevelFlushData = null;
        $this->leevelFlushed = true;

        $this->handleEvent(static::AFTER_SAVE_EVENT);

        return $result;
    }
数据持久化数据.

@return mixed