On May 23, 2007, at 11:02 AM, bilh wrote:
> > Hi folks, > > I'm adapting an app to CakePHP, learning as I go. Here's my question: > > I have three models: > > Store hasMany Forms > Form belongsTo Store, hasMany Orders > Order belongs to Form > > What would be the CakePHP way to get all Orders for a given Store? $this->Store->recursive = 2; $result = $this->Store->findById($id); Play with that recursive value until you have the data you need, using unbindModel() to eliminate whatever you don't. -- John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
