dimanche 22 février 2015

Object states in ORMs


I read the following in the Phalcon framework's forum:


Every object in the ORM has 3 states:


DIRTY STATE PERSISTENT: The object is attached to a row persisted in the database DIRTY STATE TRANSIENT: The object is created in the application userland by is not attached to a row persisted in the database DIRTY STATE DETACHED: The object exists in the application and it was recently detached from a row persisted in the database When you create an object it's in TRANSIENT state, you can only update objects when they're in PERSISTENT state. findFirst() and find() returns objects in PERSISTENT state which are capable of being updated to the persistance.


Are these standard terminology? Is there any reference?





Aucun commentaire:

Enregistrer un commentaire