Re: CounterCache on HABTM tables?
If you have one record for every association, does make sense to have a counter there? The counter should be on each table.
--
Thiago Belem,
Desenvolvedor WEB
Enviado do meu Android
Em 11/01/2012 02:41, "O.J. Tibi" <ojtibi@gmail.com> escreveu:
-- Hi folks,
I was just wondering, if it's possible to create a custom Model class for my HABTM join table, and add `counterCache` to its belongsTo associations.
If I did something like above and relied on the Model::save() method (for example, calling Article->save() where the Article HABTM Tags), will the `articles_tags.article_count` and `articles_tags.tag_count` fields be updated?
TIA,
OJ
--
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
cake-php+unsubscribe@googlegroups.com 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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home