I have such scheme of tables:

My task is to get the event's description string from third table via relations, which look so:
'dates'=>array(self::HAS_MANY, 'CalendarDates', '',
"on" => '"t"."CalendarDateId"="dates"."calendar_date_id"'),
'events'=>array(self::HAS_MANY, 'CalendarDayEvents', '',
"on" => '"dates"."list_events" = "events"."date_id"')
So, I consider, that getting datesfrom first relation
$UserCalendar = CalendarsUsers::model()->
with(array('dates','events'))->
find('user_id =:user_id', array(':user_id'=> $userId));
I would get the such scheme
Date as Dates
and list of events fron third table, which is linked to every Date
But using the relation, which is presented above, I'm getting "parallel" relation, where dates and events are "parallel", so I can't write code like this:
<?php foreach ($calendar->dates as $day): ?>
<b>Date:</b> <?php echo($day->date_event); ?> <br>
<i>Event:</i>
<?php foreach ($day as $event): ?>
<?php echo($event->event_description); ?>
<?php endforeach; ?>
<br/>
<?php endforeach; ?>
which returns me error as expected.