Cakephp containable behavior

来源:互联网 发布:章燎原的学历知乎 编辑:程序博客网 时间:2024/04/30 09:17

Containable behavior is useful in providing customized model linking when using model find function to retrieve db data. Compared to using 'recursive' attribute, containable is more customized cuz it allows programmers to choose which models they want to link to.

 

e.g.

 

1. use containable behavior

 

 

2. set contained model

 

原创粉丝点击