title: KOHANA - ErrorException [ Fatal Error ]: Cannot use object of type Model as array
body: <p>Can you advise on how to resolve the following error:</p>
  
  <p><code>ErrorException [ Fatal Error ]: Cannot use object of type Model_Branch as array</code></p>
  
  <p>Please see controller:</p>
  
  <pre><code>
  public function action_view($agent_id='') {
          $agent =  ORM::factory('agent', $agent_id);
  
          if ($agent->loaded()) {
  
              $values = $agent->as_array();
              $branches = $agent->branches->find_all()->as_array();
  
              // Show page
              $this->template->title = $agent->company_name;
              $this->template->content = View::factory('agent/view')
                      ->bind('title', $this->template->title)
                      ->bind('values', $values)
                      ->bind('branches', $branches);
          } else {
              Request::instance()->redirect('agent');
          }
      }
  </code></pre>