我在我的countries
表上有一個字段member_count
。在cakephp - 我可以counterCache相關模型?例如:用戶 - >配置文件
Profile
屬於關聯Country
counterCache => 'member_count',
counterScope => array('Profile.country => 'US')
所以,當用戶運行一個節省$this->User->Profile->save($this->data)
,我想更新counterCache
在Country
。
可能嗎?
你嘗試了嗎? – mark 2011-06-07 16:37:31
是的,我嘗試了很多不同的方法。 – 2011-06-07 21:34:17