{"record":{"id":"cd01f8a46af1a238","repo":"phalcon/cphalcon","slug":"the-keepsnapshots-option-must-be-enabled-to-trac","errorCode":null,"errorMessage":"The 'keepSnapshots' option must be enabled to track changes in '{className}'","messagePattern":"The 'keepSnapshots' option must be enabled to track changes in '(.+?)'","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\SnapshotsDisabled","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model.zep","lineNumber":2081,"sourceCode":"     * ```php\n     * $invoices = Invoices::findFirst();\n     * print_r($invoices->getChangedFields()); // []\n     *\n     * $invoices->deleted = 'Y';\n     *\n     * $invoices->getChangedFields();\n     * print_r($invoices->getChangedFields()); // [\"deleted\"]\n     * ```\n     */\n    public function getChangedFields() -> array\n    {\n        var metaData, name, snapshot, columnMap, allAttributes, value;\n        array changed;\n\n        let snapshot = this->snapshot;\n\n        if unlikely typeof snapshot !== \"array\" {\n            throw new SnapshotsDisabled(get_class(this));\n        }\n\n        /**\n         * Return the models meta-data\n         */\n        let metaData = this->getModelsMetaData();\n\n        /**\n         * The reversed column map is an array if the model has a column map\n         */\n        let columnMap = metaData->getReverseColumnMap(this);\n\n        /**\n         * Data types are field indexed\n         */\n        if typeof columnMap !== \"array\" {\n            let allAttributes = metaData->getDataTypes(this);\n        } else {","sourceCodeStart":2063,"sourceCodeEnd":2099,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model.zep#L2063-L2099","documentation":"Error \"The 'keepSnapshots' option must be enabled to track changes in '{className}'\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model.zep:2081 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"}