phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\RecordCannotRefresh
The record cannot be refreshed because it does not exist or
Error message
The record cannot be refreshed because it does not exist or is deleted in '{className}' What it means
Error "The record cannot be refreshed because it does not exist or is deleted in '{className}'" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model.zep:2726
{
if !isset this->{attribute} {
return null;
}
return this->{attribute};
}
/**
* Refreshes the model attributes re-querying the record from the database
*/
public function refresh() -> <ModelInterface>
{
var metaData, readConnection, schema, source, table, uniqueKey, tables,
uniqueParams, dialect, row, attribute, manager, columnMap;
array fields;
if unlikely this->dirtyState != self::DIRTY_STATE_PERSISTENT {
throw new RecordCannotRefresh(get_class(this));
}
let metaData = this->getModelsMetaData(),
readConnection = this->getReadConnection(),
manager = <ManagerInterface> this->modelsManager;
let schema = this->getSchema(),
source = this->getSource();
if schema {
let table = [schema, source];
} else {
let table = source;
}
let uniqueKey = this->uniqueKey;
if !uniqueKey {View on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model.zep:2726 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/f319981b5af2690c.
Report an issue: GitHub.