common/models/base/ModelMapper.php
public static function queryByParentModelId( $parentId, $parentType, $modelId ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype AND $tableName.modelId=:mid", [ ':pid' => $parentId, ':ptype' => $parentType, ':mid' => $modelId ] );
	}
public static function queryByParentModelId( $parentId, $parentType, $modelId ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype AND $tableName.modelId=:mid", [ ':pid' => $parentId, ':ptype' => $parentType, ':mid' => $modelId ] );
	}
public static function queryByParentModelId ( $ parentId , $ parentType , $ modelId ) { $ tableName = static :: tableName ( ) ; return self :: queryWithModel ( ) -> where ( "$tableName.parentId=:pid AND $tableName.parentType=:ptype AND $tableName.modelId=:mid" , [ ':pid' => $ parentId , ':ptype' => $ parentType , ':mid' => $ modelId ] ) ; }
Return query to find the mapping for given parent id, parent type and model id.

@param integer $parentId
@param string $parentType
@param integer $modelId
@return \yii\db\ActiveQuery to find using parent id and parent type.
Return query to find the mapping for given parent id parent type and model id .