We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Modified or before value in model

In rails there is a notion of modified? value if the record is modified.

I donĀ“t find any reference in documentation to acess before values (was in rails).

i can add this with afterFetch keep value and check in beforesave to know if value has change. is there any other solution ?

edited Apr '14

I didn't see it before, but this is the functionnality i need.

In the documentation, i can't see how get before values, i can only check if the value has change. I find this in C files : getSnapshotData but it's missing in the documentation

And i have a bug, i use it like this

class Product extends Phalcon\Mvc\Model {
  public function initialize(){
  public function afterSave(){

And i get many fields of other model, not only the product model.