src/mako/database/midgard/traits/OptimisticLockingTrait.php
public function reload(): bool
	{
		if($this->isPersisted)
		{
			$model = static::get($this->getPrimaryKeyValue());

			if($model !== false)
			{
				$this->original = $this->columns = $model->getRawColumnValues();

				$this->related = $model->getRelated();

				return true;
			}
		}

		return false;
	}
public function reload(): bool
	{
		if($this->isPersisted)
		{
			$model = static::get($this->getPrimaryKeyValue());

			if($model !== false)
			{
				$this->original = $this->columns = $model->getRawColumnValues();

				$this->related = $model->getRelated();

				return true;
			}
		}

		return false;
	}
public function reload ( ) : bool { if ( $ this -> isPersisted ) { $ model = static :: get ( $ this -> getPrimaryKeyValue ( ) ) ; if ( $ model !== false ) { $ this -> original = $ this -> columns = $ model -> getRawColumnValues ( ) ; $ this -> related = $ model -> getRelated ( ) ; return true ; } } return false ; }
Reloads the record from the database.

@return bool
Reloads the record from the database .