Hi,
I am wondering whether it is possible to use counterCache for two
fields... let me explain:
I need to cache count on Post level its (hasMany) images. Now I have
field 'image_count' in Post DB table. and it is working fine but what
to do if I need to cache to different scopes?? It is possible to
extended caching fields to something like:
new_images_count AND approved_images_count ???
and image model would have....2 two different conditions???
'counterCache' => true,
'counterScope' => array('image.status_id' => 1),
//counts only
(new = 1) images
'counterCache' => true,
'counterScope' => array('image.status_id' => 2),
//counts only
(approved = 2) images
The main problem i see where to set the name of those field, it has
some convetion....
Any Idea??
Thanks
Tomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---