Clients hasMany Project
Project hasMany Tasks
I want to show
Client A Project A Task 1
Client A Project B Task 1
Client B Project A Task 1
Client C Project A Task 1
Client D - -
Client E - -
If the client doesn’t have a project, I still want to show the client - this is easily achieved by find('all')
and a LEFT
join on Clients
.
However when the client has more than 1 project, I am not sure how to output the client row again because the associated entities are nested
Client
Project
Task
Project
Task
Client ..
Does this make sense - I looked at the hydrate
option but don’t really understand it enough.
thanks