[eluser]NiconPhantom[/eluser]
Hi all,
I have yet another small question... I have hierarchical menu with relationship between id and parent_id, I have created model like that:
class menu_model extends DataMapper {
var $table = "menu";
var $has_one = array(
'parent' => array(
'class' => 'menu',
'other_field' => 'pid'
)
);
var $has_many = array(
'child' => array(
'class' => 'menu',
'other_field' => 'id'
)
);
function __construct()
{
parent::__construct();
}
}
and inside the controller:
$c1 = new menu_model();
$c1->get();
The problem is that print_r($c1,2) is returning not only DB content, but language translations and other staff as well, the data looks like few pages long array. Is it normal or I am doing something incorrectly?