hasmany ããçµæããã¤ã®ãã¼ã¿ãããã®ã ããï¼ ãããªã¨ãã«ä½¿ãã¨é常ã«ä¾¿å©ã 注æãããã®ããcakephp ã® save , del ã¡ã½ãããå©ç¨ããå ´åã®ã¿å¤æ´ãããã®ã§ãç´æ¥DBã触ã£ãå ´åãªã©ã¯è¦æ³¨æã æ¡ä»¶ä»å㯠親ã¢ãã«ãSponcer (hasMany) åã¢ãã«ãReport (belongsTo) ã¨ããã Sponcerã¢ãã«ãããã¤ã®Reportãæã£ã¦ãããæ°ããã¾ãã¯ãSponcerãã¼ãã«ã« report_all_count ãã£ã¼ã«ããä½æã ç¶ãã¦ãReportã¢ãã«ã«ä»¥ä¸ãä½æã <? App::uses('AppModel', 'Model'); class Report extends AppModel { public $belongsTo = array( 'Sponcer' => array( 'counterCache' => ar
{{#tags}}- {{label}}
{{/tags}}