Symfony 1.4 Propel:通过外键访问表数据

I need data from two MySQL tables - I wrote a Propel query to retrieve data from my 'search' table. Now, I am trying to retrieve data from my 'item_view' table using ->getItemView()->getPosition() within the view. The search_id (search table primary key) is a foreign key in the item_view table but the item_view_id (item view primary key) is not a foreign key in the search table. Any suggestions for how to retrieve this data? Code below.

View:

<?php foreach ($queries as $query) : ?>
<tr>
    <td><?php echo $query->getTs(); ?></td>
    <td><?php echo $query->getUser() ? $query->getUser()->getEmail() : ""; ?></td>
    <td><?php echo $query->getTerm(); ?></td>
    <td><?php echo $query->getResultCount(); ?></td>
    <td><?php echo **$query->getItemViews()->getItem()->getPartName()**; ?></td>
    <td><?php echo **$query->getItemViews()->getPosition()**; ?></td>
</tr>
<?php endforeach; ?>

Controller: (note: I have no problem retrieving user table data because its foreign key is in the search table.

$c = new Criteria();
$c->addDescendingOrderByColumn(SearchPeer::TS);
$this->queries = SearchPeer::doSelect($c);

Is this a case where you cannot retrieve data from a table unless its primary key is the foreign key of the table for which the propel query is formed?

Any solutions are appreciated!

I finally found the solution to my problem, which had less to do with Propel and Symfony and everything to do with my understanding of relational databases.

There may be multiple item_view rows for a single search row. The ->getItemView() I was trying to originally use should be ->getItemViews() because there is a one to many relationship. It also needs to be nested as its own foreach loop to retrieve values. Correct code below:

View:

<?php foreach ($queries as $query) : ?>
<tr>
    <td><?php echo $query->getTs(); ?></td>
    <td><?php echo $query->getUser() ? $query->getUser()->getEmail() : ""; ?></td>
    <td><?php echo $query->getTerm(); ?></td>
    <td><?php echo $query->getResultCount(); ?></td>
    <?php foreach ($query->getItemViews() as $iav) : ?>
        <td><?php echo $iav->getItem()->getPartName(); ?></td>
        <td><?php echo $iav->getPosition(); ?></td>
    <?php endforeach; ?>
</tr>
<?php endforeach; ?>