Hello,
I have MANY_MANY relation question - how can one get related information AND relation information as well?
What I mean is, I have ‘comments’ relation for a User model:
'comments'=>array(
self::MANY_MANY,
'Comment',
Comment_reference::tableName().'(profile_id, comment_id)',
'with'=>'author',
'index'=>'id',
'order'=>'comment.post_time DESC',
),
It works well if I need to get comments for a user, but i also need to have Comment_reference row information for each found comment. It’s all because each comment can be related to many users, and Comment_reference (relation table) purpose is not only to serve as foreignKey helper.
So, can it be done via AR? Please help