Use counterCache: http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html
On Sat, Jun 16, 2012 at 12:03 PM, Fábio <[email protected]> wrote: > I have this association: > > Task hasmany Recipient > Recipient belongsto Task > > There is a status column in the recipients table that is updated by a java > program. > > I need to show in the baked index view, and aditional column telling the > user how many recipients each task have and how many are of some given state > (eg 1). > > Example > # name status created > actions > 1 test 50/2510 ... > ... > > > -- > 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
