You need to force a join from A to C using B so that you can specify conditions on C fields within your find ... sounds easy when I write it like that, and in fact it is quite easy once you get your head around it.
You need to unbind the relationship between B and C then bind A to C setting 'foreignKey'=>false, and supplying your own conditions array with 'B.c_id = c.id'. Tbis works because A is associated with B so you can use fields of model B in the condition when joining A to C but you need to make sure B is not associated with C at the time hence the need to unbind them first. This information comes courtesy of a few articles written by teknoid so give them a read at: http://teknoid.wordpress.com/?s=force+join Paul. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
