innerJoinWith() 공개 메소드

This is a shortcut method to ActiveQuery::joinWith with the join type set as "INNER JOIN". Please refer to ActiveQuery::joinWith for detailed usage of this method.
또한 보기: joinWith()
public innerJoinWith ( string | array $with, boolean | array $eagerLoading = true )
$with string | array the relations to be joined with.
$eagerLoading boolean | array whether to eager loading the relations.
예제 #1
0
 public function filterQuery(ActiveQuery $query)
 {
     if ($this->type) {
         $query->innerJoinWith('type');
         $query->andWhere(['{{death_reason_type}}.[[key]]' => $this->type]);
     }
     return $query;
 }
예제 #2
0
 public function filterQuery(ActiveQuery $query)
 {
     if ($this->weapon) {
         $query->andWhere(['{{weapon}}.[[key]]' => $this->weapon]);
     }
     if ($this->type) {
         $query->innerJoinWith('type');
         $query->andWhere(['{{weapon_type}}.[[key]]' => $this->type]);
     }
     if ($this->sub) {
         $query->innerJoinWith('subweapon');
         $query->andWhere(['{{subweapon}}.[[key]]' => $this->sub]);
     }
     if ($this->special) {
         $query->innerJoinWith('special');
         $query->andWhere(['{{special}}.[[key]]' => $this->special]);
     }
     return $query;
 }