I am trying to load all the accounts associated to a given project, but for some reason that relationship is not loadingā¦ Any ideas?
Code Snippet:
$focus = new Project();
$focus->retrieve($_GET[āprojectIDā]);
$focus->load_relationship(āprojects_accountsā);
$accounts = $focus->projects_accounts->getBeans();
$GLOBALS[ālogā]->fatal(print_r($focus, true)); // This shows the relationship and the accounts for the projectID passed
$GLOBALS[ālogā]->fatal($focus->name);
foreach ($focus->projects_accounts->getBeans() as $account)
{
$GLOBALS[ālogā]->fatal($account->name);
}
This errors out as $focus->projects_accounts->getBeans() is erroring out with Call to a member function getBeans() on a non-object.