This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.