phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\UpdateSnapshotDisabled
The 'updateSnapshotOnSave' option must be enabled for this m
Error message
The 'updateSnapshotOnSave' option must be enabled for this method to work properly in '{className}' What it means
Error "The 'updateSnapshotOnSave' option must be enabled for this method to work properly in '{className}'" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model.zep:2448
* $invoices->deleted = 'Y';
*
* $invoices->getChangedFields();
* print_r($invoices->getChangedFields()); // ["deleted"]
* $invoices->save();
* print_r($invoices->getChangedFields()); // []
* print_r($invoices->getUpdatedFields()); // ["deleted"]
* ```
*/
public function getUpdatedFields() -> array
{
var name, snapshot, oldSnapshot, value;
array updated;
let snapshot = this->snapshot;
let oldSnapshot = this->oldSnapshot;
if unlikely !Settings::get("orm.update_snapshot_on_save") {
throw new UpdateSnapshotDisabled(get_class(this));
}
if unlikely typeof snapshot != "array" {
throw new SnapshotsDisabled(get_class(this));
}
/**
* Dirty state must be DIRTY_PERSISTENT to make the checking
*/
if unlikely this->dirtyState != self::DIRTY_STATE_PERSISTENT {
throw new RecordNotPersisted(get_class(this));
}
let updated = [];
for name, value in snapshot {
/**
* If some attribute is not present in the oldSnapshot, we assumeView on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model.zep:2448 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/f492c0a595d7a080.
Report an issue: GitHub.