Reputation: 1200
In the following case:
'with'=>array('pros.comments', 'cons.comments')
the solution of disambiguating 'comments' is:
'with'=>array('pros.comments', 'cons.comments'=>array('alias'=>'con_comments'))
But what if I have three levels:
'with'=>array('pros.comments.author', 'cons.comments.author')
??? How to disambiguate both comments and author?
Thanks in advance
Upvotes: 1
Views: 267
Reputation: 4114
Try this
'with'=array('pros.comments'=>array('alias'=>'pros_comments','with'=>array('author'=>array('alias'=>'pros_comments_author'))),'cons.comments'=>array('alias'=>'cons_comments','with'=>array('author'=>array('alias'=>'cons_comments_author'))))
Upvotes: 1