关联模型得到的只有两级,关联不到三级
protected $_link = array(
/*'sitemap' => self::HAS_MANY*/
'sitemap' => array(
'mapping_type' => self::HAS_MANY,
'class_name' => 'Sitemap',
'foreign_key' => 'uid',
'mapping_name' => 'sitemap',
'mapping_order' => 'sort asc',
),
);array(4) {
[0] => array(29) {
["id"] => string(1) "1"
["post_key"] => string(0) ""
["parent_id"] => string(1) "0"
["node"] => NULL
["name"] => string(12) "后台导航"
["title"] => NULL
["code"] => string(5) "admin"
["type"] => string(4) "none"
["channel_type"] => string(7) "channel"
["list_type"] => string(4) "text"
["target"] => NULL
["model_id"] => string(1) "0"
["module"] => NULL
["submodule_id"] => string(1) "0"
["action_id"] => string(1) "0"
["parameter"] => NULL
["controller_id"] => string(1) "0"
["link"] => NULL
["photo"] => NULL
["description"] => NULL
["content"] => NULL
["sort"] => string(1) "0"
["status"] => string(1) "1"
["recommend"] => string(1) "0"
["memo"] => NULL
["recycle"] => string(1) "0"
["view"] => string(1) "1"
["udi"] => NULL
["sitemap"] => array(1) {
[0] => array(28) {
["id"] => string(1) "3"
["post_key"] => string(0) ""
["parent_id"] => string(1) "1"
["node"] => NULL
["name"] => string(12) "系统规划"
["title"] => NULL
["code"] => NULL
["type"] => string(4) "none"
["channel_type"] => string(7) "channel"
["list_type"] => string(4) "text"
["target"] => NULL
["model_id"] => string(1) "0"
["module"] => NULL
["submodule_id"] => string(1) "0"
["action_id"] => string(1) "0"
["parameter"] => NULL
["controller_id"] => string(1) "0"
["link"] => NULL
["photo"] => NULL
["description"] => NULL
["content"] => NULL
["sort"] => string(1) "0"
["status"] => string(1) "1"
["recommend"] => string(1) "0"
["memo"] => NULL
["recycle"] => string(1) "0"
["view"] => string(1) "1"
["udi"] => NULL
}
}
}
最佳答案