src/Mapper/Relation/HasAndBelongsToMany.php
protected function addJoinTable(Select $query)
    {
        $relationTable = $this->getRelationTable();
        $table = $this->getParentTableName();
        $pmk = $this->getParentPrimaryKey();
        $rfk = $this->getRelatedForeignKey();
        $query->join(
            $relationTable,
            "rel.{$rfk} = {$table}.{$pmk}",
            null,
            'rel'
        );
        return $this;
    }
protected function addJoinTable(Select $query)
    {
        $relationTable = $this->getRelationTable();
        $table = $this->getParentTableName();
        $pmk = $this->getParentPrimaryKey();
        $rfk = $this->getRelatedForeignKey();
        $query->join(
            $relationTable,
            "rel.{$rfk} = {$table}.{$pmk}",
            null,
            'rel'
        );
        return $this;
    }
protected function addJoinTable ( Select $ query ) { $ relationTable = $ this -> getRelationTable ( ) ; $ table = $ this -> getParentTableName ( ) ; $ pmk = $ this -> getParentPrimaryKey ( ) ; $ rfk = $ this -> getRelatedForeignKey ( ) ; $ query -> join ( $ relationTable , "rel.{$rfk} = {$table}.{$pmk}" , null , 'rel' ) ; return $ this ; }
Adds the join table to the query

@param Select $query
@return self
Adds the join table to the query