{"record":{"id":"f319981b5af2690c","repo":"phalcon/cphalcon","slug":"the-record-cannot-be-refreshed-because-it-does-not","errorCode":null,"errorMessage":"The record cannot be refreshed because it does not exist or is deleted in '{className}'","messagePattern":"The record cannot be refreshed because it does not exist or is deleted in '(.+?)'","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\RecordCannotRefresh","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model.zep","lineNumber":2726,"sourceCode":"    {\n        if !isset this->{attribute} {\n            return null;\n        }\n\n        return this->{attribute};\n    }\n\n    /**\n     * Refreshes the model attributes re-querying the record from the database\n     */\n    public function refresh() -> <ModelInterface>\n    {\n        var metaData, readConnection, schema, source, table, uniqueKey, tables,\n            uniqueParams, dialect, row, attribute, manager, columnMap;\n        array fields;\n\n        if unlikely this->dirtyState != self::DIRTY_STATE_PERSISTENT {\n            throw new RecordCannotRefresh(get_class(this));\n        }\n\n        let metaData       = this->getModelsMetaData(),\n            readConnection = this->getReadConnection(),\n            manager        = <ManagerInterface> this->modelsManager;\n\n        let schema = this->getSchema(),\n            source = this->getSource();\n\n        if schema {\n            let table = [schema, source];\n        } else {\n            let table = source;\n        }\n\n        let uniqueKey = this->uniqueKey;\n\n        if !uniqueKey {","sourceCodeStart":2708,"sourceCodeEnd":2744,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model.zep#L2708-L2744","documentation":"Error \"The record cannot be refreshed because it does not exist or is deleted in '{className}'\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model.zep:2726 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"}