Recently my records started to disappear from my application’s database so I want to log every database operation cakephp makes. Where should I put the logging commands?
P.S.: This is not the first time cakephp do this to me. Did anybody face this problem?
You have a function beforeSave() in model.
You can put it in AppModel.php. It’s called before saving to DB.
Edit:
Well, I have found something and I hope it will help you:
http://bakery.cakephp.org/articles/rainchen/2009/03/09/how-to-debug-as-in-rails