I have a content model and a comment model. On insertion of comment I am updating the comment_count in content table using counterCache feature of cakephp(belongsTo relation), but that time it is also updating the modified date in content table which I don’t want. How can I do it ?
Share
Create a custom method for that counting and updating and call it in afterSave() of your comments model and when you save the new count to the associated table make sure
modified is set to false.