yiisoft/yii-core

Split ActiveQuery

SamMousa opened this issue · 1 comments

Currently yii\db\ActiveQuery operates in 2 contexts (this is documented in the PHPDoc):

  • Normal
  • Relational

This is a violation of the SRP and I don't think there's a need for it.
For example, ActiveQuery class has a $primaryModel property, and a lot of functions change their behavior based on whether or not it is set.

I think we should split this class up into 2 classes, I realize there's some stuff to figure out, that's what this issue is for :)

This issue was moved by samdark to yiisoft/active-record#2.