shaaz

Untitled

Jun 13th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. return array(
  2.         'author' => array(self::BELONGS_TO, 'User', 'author_id'),
  3.         'comments' => array(self::HAS_MANY, 'Comment', 'post_id',
  4.             'condition'=>'comments.status='.Comment::STATUS_APPROVED,
  5.             'order'=>'comments.create_time DESC'),
  6.         'commentCount' => array(self::STAT, 'Comment', 'post_id',
  7.             'condition'=>'status='.Comment::STATUS_APPROVED),
  8.     );
Advertisement
Add Comment
Please, Sign In to add comment