Yii2 Hasmany -Beziehung zusätzliche Bedingung
public function getImages()
{
return $this->hasMany(RecipeImage::className(), ['imageable_id' => 'id'])
->andOnCondition(['imageable_type' => 'Person']);
}
Mysterious Macaque