I think that those functions like delete, count, delete All, delete All By Attribute, which don’t have before function also must have that feature.
I think that those functions like delete, count, delete All, delete All By Attribute, which don’t have before function also must have that feature.
such functions are used for batch deleting updating , just for speed . if you want to do something before such operation ,it will be nonsense . before and after hook is only useful to single entity operation (you see if in database
you can create before/after XXX trigger),but if it is batch operation the affected rows is dynamic number .and the only information you can get is the parameters passed to these function, but for activeRecord you can use "$this" , the same thing in database you can refer to the "NEW" and "OLD".