Lets assume, we have a code, and we need to change robot's name in cycle:
$robots = Robots::find(array("type='virtual'", "order" => "name"));
foreach($robots as $robot){
$robot->name = rand(1,10)
}
Objects do not actually change. If I do next cycle with resultset - all objects will have original values. I understand that Resultsets are immutable. Isn't it?
Is there is a possibility to change model objects while iterating through resultset? Or I need to find workarounds to solve my task?