protected function prefixTableJoinCondition($table)
    {
        $tm = $this->table->getTableManager();
        if (is_array($table)) {
            $alias = key($table);
            $prefixed_table = $tm->getPrefixedTable($table[$alias]);
            $table = [$alias => $prefixed_table];
        } elseif (is_string($table)) {
            $prefixed_table = $tm->getPrefixedTable($table);
            $table = $prefixed_table;
        }
        return $table;
    }