public function setupJoinTables($join = 'all')
        {
            if (is_array($join)) {
                foreach ($join as $join_column) {
                    $foreign_table = $this->table->getForeignTableByLocalColumn($join_column);
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            } elseif (!is_array($join) && $join == 'all') {
                foreach ($this->table->getForeignTables() as $foreign_table) {
                    $this->join($foreign_table->getTable(), $foreign_table->getKeyColumnName(), $this->table->getB2DBAlias() . '.' . $foreign_table->getColumnName());
                }
            }
        }