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

What is Phalcon\Mvc\Model::DIRTY_STATE_DETACHED?

I have not found any info in the documentation on the constant: Phalcon\Mvc\Model::DIRTY_STATE_DETACHED

What does it stand for?

I assume that DIRTY_STATE_PERSISTENT marks a model which is saved in the database (i.e. is not dirty), and DIRTY_STATE_TRANSIENT marks the one which has not been synced with the database yet (i.e. is dirty).



98.9k
Accepted
answer

A record is marked as detached after being deleted ie. $robot->delete(), this means the record is not in the persistence anymore.

Now it's clear. Thank you.