{"record":{"id":"0674cd6567d4dad8","repo":"phalcon/cphalcon","slug":"change-checking-cannot-be-performed-because-the-ob","errorCode":null,"errorMessage":"Change checking cannot be performed because the object has not been persisted or is deleted in '{className}'","messagePattern":"Change checking cannot be performed because the object has not been persisted or is deleted in '(.+?)'","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\RecordNotPersisted","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model.zep","lineNumber":2459,"sourceCode":"        var name, snapshot, oldSnapshot, value;\n        array updated;\n\n        let snapshot = this->snapshot;\n        let oldSnapshot = this->oldSnapshot;\n\n        if unlikely !Settings::get(\"orm.update_snapshot_on_save\") {\n            throw new UpdateSnapshotDisabled(get_class(this));\n        }\n\n        if unlikely typeof snapshot != \"array\" {\n            throw new SnapshotsDisabled(get_class(this));\n        }\n\n        /**\n         * Dirty state must be DIRTY_PERSISTENT to make the checking\n         */\n        if unlikely this->dirtyState != self::DIRTY_STATE_PERSISTENT {\n            throw new RecordNotPersisted(get_class(this));\n        }\n\n        let updated = [];\n\n        for name, value in snapshot {\n            /**\n             * If some attribute is not present in the oldSnapshot, we assume\n             * the record as changed. array_key_exists() is used so a\n             * snapshot that legitimately stores `null` is not mistaken for\n             * an absent key under the post-5.13.0 Zephir `isset` semantics\n             * [#17042].\n             */\n            if !array_key_exists(name, oldSnapshot) || value !== oldSnapshot[name] {\n                let updated[] = name;\n            }\n        }\n\n        return updated;","sourceCodeStart":2441,"sourceCodeEnd":2477,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model.zep#L2441-L2477","documentation":"Error \"Change checking cannot be performed because the object has not been persisted or is deleted in '{className}'\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model.zep:2459 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}