->With();

Hi,

I have this code …




->with("job_title.job_role.job_role_competencies")



Running this through the data provider outer left joins my job_title and outer left joins my job role.

But it does not join my job_role_competencies.

job_title = belongs_to

job_role = belongs_to

job_role_competencies = has_many

I have tried these as well …




->with("job_title", "job_title.job_role", "job_role.job_role_competencies")



And …




->with("job_title.job_role", "job_role.job_role_competencies")



Still get the same result, no join on my job_role_competencies.

You probably need to set "together" to true.

http://www.yiiframework.com/wiki/527/relational-query-lazy-loading-and-eager-loading-with-and-together