Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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).



85.3k
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.