Ok now Im confused:

Basically my players table has a TeamID and a PositionID foreign key

                // Lookup in the database Players that fit this word
                $table  = new sites_lovefootball_models_Players();
                $where  = 'MATCH (fname,sname) AGAINST ("Dean")';
                $rowset = $table->fetchAll($where);

                // Do i need to run these in a loop ?

                $row    = $rowset->current();
$team = $row->findParentRow('sites_lovefootball_models_Teams');

I have declared the ref map and dependant tables in the right classes

    protected $_referenceMap = array(
        'Team' => array(
            'columns'       => 'team_id',
            'refTableClass' => 'sites_lovefootball_models_Teams',
            'refColumns'    => 'team_id'
        ),
        'Position' => array(
            'columns'       => 'position_id',
            'refTableClass' => 'sites_lovefootball_models_Positions',
            'refColumns'    => 'position_id'
        )
    );

I want to get when i search the table the references - I thought it did this automatically instead i am still getting:

    [_data:protected] => Array
        (
            [player_id] => 21
            [team_id] => 19
            [position_id] => 4
            [fname] => Dean
            [sname] => Ashton
            [value] => 9
        )

When I want
    [_data:protected] => Array
        (
            [player_id] => 21
            [team_id] => Sheffield United
            [position_id] => Forward
            [fname] => Dean
            [sname] => Ashton
            [value] => 9
        )

Is this possible for all returned data?

Reply via email to