cakephp ->set() a value in an object -
i can use cakephp set() add value in object @ top level need set value object inside object , can seem access it. possible?
i need add business_id inside employee object.
i though might use $user->set->employee('business_id', '1');
error on employee part.
object(app\model\entity\user) { 'email' => 'dfgdfg@sdfsdf.com', 'new_password' => 'ttt', 'confirm_password' => 'ttt', 'employee' => object(app\model\entity\employee) { 'name' => 'dsfsfsdfsfd', 'email' => 'sdfsdfsdf@sdfsdf.com', 'surname' => 'sdfsdfsdfsdf', 'employee_num' => 'sdfsdfsdfsd', '[new]' => true,
i tried couple of different ways , got work $user->employee->set('business_id', '1');
Comments
Post a Comment