protected function _appendJunctionJoin($query, $conditions)
    {
        $name = $this->_junctionAssociationName();
        /** @var array $joins */
        $joins = $query->clause('join');
        $matching = [
            $name => [
                'table' => $this->junction()->getTable(),
                'conditions' => $conditions,
                'type' => QueryInterface::JOIN_TYPE_INNER
            ]
        ];

        $assoc = $this->getTarget()->getAssociation($name);
        $query
            ->addDefaultTypes($assoc->getTarget())
            ->join($matching + $joins, [], true);

        return $query;
    }