-
Hello! The function class Robots extends Model
{
public function initialize()
{
$this->keepSnapshots(true);
}
} The Fix from issue #15837 doesn't work too. Maybe someone has encountered or have any ideas? Thank you in advance. Case:
php 8.1, phalcon 5.1.3, nginx, almalinux |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
If use
|
Beta Was this translation helpful? Give feedback.
-
public function __serialize(): array
{
$arr = parent::__serialize();
if ($arr['snapshot'] === null) {
unset($arr['snapshot']);
}
return $arr;
} |
Beta Was this translation helpful? Give feedback.
-
/cc @niden |
Beta Was this translation helpful? Give feedback.
__serialization
setssnapshot = null
in the cache model if attributes are not changed.https://github.com/phalcon/cphalcon/blob/5.0.x/phalcon/Mvc/Model.zep#L384
If the snapshot is cached, then
__unserialize
setsnapshot = cachedSnapshot
. And this condition does not workhttps://github.com/phalcon/cphalcon/blob/5.0.x/phalcon/Mvc/Model.zep#L603
temporary fix in the model (im use useDynamicUpdate(true), snapshot enable for all models):