Yii Framework Forum: Ar::find() - Yii Framework Forum

Jump to content

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

Ar::find()

#1 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,688
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 06 November 2013 - 09:27 PM

Model::find() returning AR or AQ according to param type is a little bit confusing, don't you think?
IMHO Model::find()->where(['id' => 1])->one() is already short enough.

Or something like Model::find()->byPk(1), if the query involves static::primaryKey().
God is real unless declared as integer
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