In my experience you need to do it with a simple SQL query at the db level. I am not aware of any Cake magic. If it's a continuous problem worthy of some dev time you could write a simple behaviour to do it.
Jeremy Burns Class Outfit http://www.classoutfit.com On 6 Jul 2011, at 16:43, wiseguysonly wrote: > One of my early CakePHP sites has come back to haunt me. I need to add > a counterCache to a pre-existing hasMany relationship. > > Does there exist a method to set up the counterCache with current > counts field once I have have created it? > > Thanks in advance, > > Tim > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
