Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/app/models/Data/Base.php
2023-04-30 16:52:38 +02:00

26 lines
603 B
PHP

<?php
namespace App\Model\Data;
use Phalcon\Mvc\Model;
class Base extends Model
{
/**
* {@inheritdoc}
*
* Phalcon throws an exception if no valid snapshot data is present.
*
* We override this behaviour by treating no
* snapshot data (new row) as changed.
*
* @param string|array $fieldName
* @param boolean $allFields
* @return bool
*/
public function hasChanged($fieldName = null, bool $allFields = false): bool
{
return $this->hasSnapshotData() === false
|| parent::hasChanged($fieldName, $allFields);
}
}