I have a query that reads like this:
$fields = Doctrine_Core::getTable('model_1')->findByColumnId($id);
took a var_dump on fields, and it retrieves data as it should ;
next up, I do this
foreach($fields as $field)
{
$newerFields[$field->getColumnId()] =
Doctrine_Core::getTable('model2')->findByColumn2Id($field->getColumnId());
}
I take a var_dump on each $newerFields[$field] and it does yield the result as it should. Next up I try and do this:
foreach($newerFields as $newerField)
{
echo $newerField->getColumn3();
}
But this spits out: Call to undefined method Doctrine_Collection::getColumn3() in actions.class.php on line 69
I am not able to wrap my head around this and am flustered thinking on how to get it done. Can anyone spot the trouble for me?