Yii Framework Forum: Minor fix: Use CamelCase everywhere in CRUD classes - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Minor fix: Use CamelCase everywhere in CRUD classes Rate Topic: -----

#1 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 09 December 2008 - 08:34 AM

Just a minor improvement: To be consistent with the note in the Yii guide, the created CRUD classes should also use CamelCase in the relations example:

    public function relations()
    {
        return array(
            'author'=>array(self::BELONGS_TO, 'User', 'authorId'),
            'comments'=>array(self::HAS_MANY, 'Comment', 'postId', 'with'=>'author', 'order'=>'createTime DESC'),
            'tags'=>array(self::MANY_MANY, 'Tag', 'postTag(postId, tagId)', 'order'=>'name'),
        );
    }

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,879
  • Joined: 04-October 08
  • Location:DC, USA

Posted 09 December 2008 - 08:41 AM

Thanks.
0

#3 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 09 December 2008 - 08:47 AM

Really quick, thanks :)

I hope you don't find it too nitpicking ... i just post what i find during my first steps in Yii.
0

#4 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,879
  • Joined: 04-October 08
  • Location:DC, USA

Posted 09 December 2008 - 08:50 AM

Not at all. You are very welcome to point out any bugs or fixes needed. :D
0

#5 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 09 December 2008 - 08:54 AM

Ok, then i'll proceed. ;)

I'll not open tickets for small stuff like this, if that's o.k. for you.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users