Hi,

1) I have this DB schema:

Reservation:
  columns:
    name:                      { type: string(255), notnull: true }
    email:                      { type: string(255), notnull: true }
    commets:                { type: string(500), notnull: true }

ReservationDetail:
  columns:
    reservation_id:             { type: integer, notnull: true }
    adults_reserved:          { type: string(255), notnull: true }
    childrens_reserved:      { type: string(255), notnull: true }
  relations:
    Reservation:    { onDelete: CASCADE, local: reservation_id,
foreign: id, foreignAlias: ReservationDetails }

2) Here is my query and the setVar:

$q = Doctrine_Query::create()
      ->select('r.id, rd.adults_reserved, rd.childrens_reserved')
      ->from('Reservation r')
      ->innerJoin('r.ReservationDetails rd');
$q->where('rd.reservation_id = 1');
$reservations = $q->execute();

$this->setVar("reservations", $reservations);

3) In my template:

<?php foreach ($reservations as $reservation): ?>
     <?php echo $reservation->adults_reserved?>
     <?php echo $reservation->childrens_reserved?>
<?php endforeach; ?>

Here i got an error that tells me: ...can't find related
"adults_reserved"...

My question: How can i access and print those details, what im missing
here?

Regards

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to