How to get comment id from post view shop.php

I’m trying to get a comment id (suppose there is only one comment to that certain post) from post view shop.php (demo blog). I tried this

<?php print $model->comments->id; ?>

but unfortunately it didn’t work. The relations are set in post model

'comments'=>array(self::HAS_MANY, 'Comment', 'postId'),

Any suggestions how to get this data?

Thank you.

‘comments’ will be an array

<?php print $model->comments[0]->id; ?>


Thanks a lot! :)