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::DIRTYSTATEDETACHED

What does it stand for?

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



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