fuel/orm — Issue #116: Only first related row is available in object 
Author: jfhs
Created: 2011-11-02 19:16:47+00:00
State: open

In Query->get function, for each returned row hydrate function is called. This function sets related data only if it hasn't been set yet

Lines 824-833 packages\orm\classes\query.php

// when not yet set, create the relation result var with null or array
if ( ! array_key_exists($m['rel_name'], $rel_objs))
{
$updated_relations[] = $m['rel_name'];
$rel_objs[$m['rel_name']] = $m['relation']->singular ? null : array();
}

// Only hydrate when relations weren't already fetched
if (in_array($m['rel_name'], $updated_relations))
{

So when relation is not yet there it fetches data from row sets it as updated and next rows are not processed.