I’ve started recently my adventure with yii and encounter a problem for piece of code below:
$menus = Menu::model()->with('subMenus.page','page')->findAll()
gives me error about duplicate aliases.
Menu model has subMenus array of Menu models. Now Menu model has page model therefore all child subMenus have page model as well.
I want to get all the menus with its submenus already with loaded related page objects. Is it possible to be done using relational query?