Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return array(
- 'author' => array(self::BELONGS_TO, 'User', 'author_id'),
- 'comments' => array(self::HAS_MANY, 'Comment', 'post_id',
- 'condition'=>'comments.status='.Comment::STATUS_APPROVED,
- 'order'=>'comments.create_time DESC'),
- 'commentCount' => array(self::STAT, 'Comment', 'post_id',
- 'condition'=>'status='.Comment::STATUS_APPROVED),
- );
Advertisement
Add Comment
Please, Sign In to add comment