Petra Barus

Results 16 comments of Petra Barus

Still reading the whole Query classes to start working on the pull request. But as the framework users so far, the ideas are below. First, we should add `alias` attribute...

@cebe can you give example how should I write the refactored `isRemoved` method in the above example I gave. ``` php class Query extends \yii\db\ActiveQuery { public function isNotRemoved() {...

@cebe just skimmed the #10813 and #10253, can we do something like this? ``` php class Query extends \yii\db\ActiveQuery { public function isNotRemoved() { $alias = $this->getAlias(); return $this->andWhere(["`{$alias}`.is_removed" =>...

or maybe we can have a shorthand placeholder for current alias.. like `{{}}`. ``` class Query extends \yii\db\ActiveQuery { public function isNotRemoved() { return $this->andWhere(['{{}}.is_removed' => 0]); //string {{}} will...

Haven't read update on `ActiveQuery` for a while. I assume `@alias` will be automatically generated right? so adding `@alias` in `return $this->andWhere(['@alias.is_removed' => 0]);` should work right? ``` php class...

> However I notice that in your example Shelf and Book are built on Shelf::class, so I assume they are using the same table name 'shelf' (or it probably is...