About the notSave event (working or not?)

http://docs.phalconphp.com/en/latest/reference/models.html#validation-failed-events

I was wondering if this event handler is working for someone? It doesn't seem to trigger for me..

Thanks!

edited Jun '14

The source code uses two different event handlers, on the one side notSave and on the other side notSaved. I will create an issue report for this inconsistence. notSave is only triggered as a part of the __postSave() function, notSaved is triggered after an operation is canceled as described in the documentation.



5.6k

Thanks for digging through the source code! (How's phalcon-php doing? ;-)) I also had a look at 2.0 model.zep.. I tend to believe the executing doesn't even reach _postSave but perhaps already returning false @ _preSave? https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/mvc/model.zep#L2753

Not something one would expect of course, because (stating the docs): Triggered when the INSERT or UPDATE operation fails for any reason