I have a Home model that links to a Realtor model on Home.realtor_num = Realtor.num. I have an Office model linked to the Realtor model on Realtor.office_num = Office.num.
Suppose I want easy access to Office.name in the result set of a find on the Homes table. Is there an easy way to specify the above relationship, such that $home['Office']['name'] will contain the data I'm looking for?
If you have correctly setup associations in you models:
- you can use containable behavior,
- you can access Office model from HomeController: $this->Home->Realtor->Office->find(...)
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论