We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

modelsManager can't change model table

Hey guys,

$subjectModel = new Subject();

echo $subjectModel->getSource();

echo '<hr>'.$subjectModel->count().'<hr>';

$this->modelsManager->setModelSource($subjectModel, 'test3333');

echo 'get source:'.$this->modelsManager->getModelSource($subjectModel);

echo '<hr>source:'.$subjectModel->getSource();

echo '<hr>'.$subjectModel->count();

But it outputs this:

subject

151

get source:test3333

source:subject

151

getModelSource => test3333, getSource => subject

Have I missed something? Any help much appreciated.

Did you find the way to solve it?