Repository: metamodel
Updated Branches:
  refs/heads/master 2fe6a2b73 -> 57e48be23


http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/query/FromItemTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/metamodel/query/FromItemTest.java 
b/core/src/test/java/org/apache/metamodel/query/FromItemTest.java
index b026f8d..adca140 100644
--- a/core/src/test/java/org/apache/metamodel/query/FromItemTest.java
+++ b/core/src/test/java/org/apache/metamodel/query/FromItemTest.java
@@ -27,6 +27,9 @@ import org.apache.metamodel.schema.Relationship;
 import org.apache.metamodel.schema.Schema;
 import org.apache.metamodel.schema.Table;
 
+import java.util.Collection;
+import java.util.List;
+
 public class FromItemTest extends MetaModelTestCase {
 
        private Schema _schema = getExampleSchema();
@@ -44,9 +47,9 @@ public class FromItemTest extends MetaModelTestCase {
        public void testRelationJoinToString() throws Exception {
                Table contributorTable = 
_schema.getTableByName(TABLE_CONTRIBUTOR);
                Table roleTable = _schema.getTableByName(TABLE_ROLE);
-               Relationship[] relationships = roleTable
+               Collection<Relationship> relationships = roleTable
                                .getRelationships(contributorTable);
-               FromItem from = new FromItem(JoinType.INNER, relationships[0]);
+               FromItem from = new FromItem(JoinType.INNER, 
relationships.iterator().next());
                assertEquals(
                                "MetaModelSchema.contributor INNER JOIN 
MetaModelSchema.role ON contributor.contributor_id = role.contributor_id",
                                from.toString());
@@ -73,7 +76,7 @@ public class FromItemTest extends MetaModelTestCase {
                leftSide.setAlias("a");
                SelectItem[] leftOn = new SelectItem[] { new 
SelectItem(projectIdColumn) };
 
-               Column[] columns = roleTable.getColumns();
+               List<Column> columns = roleTable.getColumns();
 
                Query subQuery = new Query();
                FromItem subQueryFrom = new FromItem(roleTable);
@@ -107,7 +110,7 @@ public class FromItemTest extends MetaModelTestCase {
    
         final QueryPostprocessDataContext dc = new 
QueryPostprocessDataContext() {
             @Override
-            protected DataSet materializeMainSchemaTable(Table table, Column[] 
columns, int maxRows) {
+            protected DataSet materializeMainSchemaTable(Table table, 
List<Column> columns, int maxRows) {
                 throw new UnsupportedOperationException("This method is not 
used");
             }
 

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/query/QueryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/metamodel/query/QueryTest.java 
b/core/src/test/java/org/apache/metamodel/query/QueryTest.java
index 823c4d9..8e518c9 100644
--- a/core/src/test/java/org/apache/metamodel/query/QueryTest.java
+++ b/core/src/test/java/org/apache/metamodel/query/QueryTest.java
@@ -106,7 +106,7 @@ public class QueryTest extends MetaModelTestCase {
         Query q1 = new Query();
         Table contributorTable = _schema.getTableByName(TABLE_CONTRIBUTOR);
         Table roleTable = _schema.getTableByName(TABLE_ROLE);
-        FromItem fromItem = new FromItem(JoinType.INNER, 
contributorTable.getRelationships(roleTable)[0]);
+        FromItem fromItem = new FromItem(JoinType.INNER, 
contributorTable.getRelationships(roleTable).iterator().next());
         q1.from(fromItem);
 
         Column nameColumn = 
contributorTable.getColumnByName(COLUMN_CONTRIBUTOR_NAME);

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/query/SelectItemTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/metamodel/query/SelectItemTest.java 
b/core/src/test/java/org/apache/metamodel/query/SelectItemTest.java
index e6bbdca..7f412c0 100644
--- a/core/src/test/java/org/apache/metamodel/query/SelectItemTest.java
+++ b/core/src/test/java/org/apache/metamodel/query/SelectItemTest.java
@@ -24,14 +24,16 @@ import org.apache.metamodel.schema.MutableColumn;
 import org.apache.metamodel.schema.Schema;
 import org.apache.metamodel.schema.Table;
 
+import java.util.List;
+
 public class SelectItemTest extends MetaModelTestCase {
 
     private Schema _schema = getExampleSchema();
 
     public void testSelectColumnInFromItem() throws Exception {
         final Table projectTable = _schema.getTableByName(TABLE_PROJECT);
-        final Column column1 = projectTable.getColumns()[0];
-        final Column column2 = projectTable.getColumns()[1];
+        final Column column1 = projectTable.getColumns().get(0);
+        final Column column2 = projectTable.getColumns().get(1);
 
         Query q = new Query().from(projectTable, "a").from(projectTable, "b");
         q.select(column1, q.getFromClause().getItem(1));
@@ -41,12 +43,12 @@ public class SelectItemTest extends MetaModelTestCase {
     }
     
     public void testToSql() throws Exception {
-        SelectItem selectItem = new 
SelectItem(_schema.getTableByName(TABLE_PROJECT).getColumns()[0]);
+        SelectItem selectItem = new 
SelectItem(_schema.getTableByName(TABLE_PROJECT).getColumns().get(0));
         assertEquals("project.project_id", selectItem.toSql());
     }
     
     public void testToSqlFuntionApproximation() throws Exception {
-        SelectItem selectItem = new SelectItem(FunctionType.MAX, 
_schema.getTableByName(TABLE_PROJECT).getColumns()[0]);
+        SelectItem selectItem = new SelectItem(FunctionType.MAX, 
_schema.getTableByName(TABLE_PROJECT).getColumns().get(0));
         selectItem.setFunctionApproximationAllowed(true);
         assertEquals("APPROXIMATE MAX(project.project_id)", 
selectItem.toSql());
     }
@@ -65,10 +67,10 @@ public class SelectItemTest extends MetaModelTestCase {
         FromItem subQueryFrom = new FromItem(roleTable);
         subQueryFrom.setAlias("c");
         subQuery.from(subQueryFrom);
-        Column[] columns = roleTable.getColumns();
+        List<Column> columns = roleTable.getColumns();
         subQuery.select(columns);
 
-        SelectItem subQuerySelectItem = 
subQuery.getSelectClause().getSelectItem(columns[1]);
+        SelectItem subQuerySelectItem = 
subQuery.getSelectClause().getSelectItem(columns.get(1));
         FromItem rightSide = new FromItem(subQuery);
         rightSide.setAlias("b");
         SelectItem[] rightOn = new SelectItem[] { subQuerySelectItem };

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/query/builder/GroupedQueryBuilderImplTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/metamodel/query/builder/GroupedQueryBuilderImplTest.java
 
b/core/src/test/java/org/apache/metamodel/query/builder/GroupedQueryBuilderImplTest.java
index 238889f..b4baf34 100644
--- 
a/core/src/test/java/org/apache/metamodel/query/builder/GroupedQueryBuilderImplTest.java
+++ 
b/core/src/test/java/org/apache/metamodel/query/builder/GroupedQueryBuilderImplTest.java
@@ -32,6 +32,8 @@ import org.apache.metamodel.schema.MutableTable;
 import org.apache.metamodel.schema.Schema;
 import org.apache.metamodel.schema.Table;
 
+import java.util.List;
+
 public class GroupedQueryBuilderImplTest extends TestCase {
 
        public void testFindColumnWithAlias() throws Exception {
@@ -76,7 +78,7 @@ public class GroupedQueryBuilderImplTest extends TestCase {
                        }
 
                        @Override
-                       protected String[] getSchemaNamesInternal() {
+                       protected List<String> getSchemaNamesInternal() {
                                throw new UnsupportedOperationException();
                        }
 

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/query/builder/SyntaxExamplesTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/metamodel/query/builder/SyntaxExamplesTest.java 
b/core/src/test/java/org/apache/metamodel/query/builder/SyntaxExamplesTest.java
index af81801..d83e82a 100644
--- 
a/core/src/test/java/org/apache/metamodel/query/builder/SyntaxExamplesTest.java
+++ 
b/core/src/test/java/org/apache/metamodel/query/builder/SyntaxExamplesTest.java
@@ -42,11 +42,11 @@ public class SyntaxExamplesTest extends TestCase {
         super.setUp();
         dc = new MockDataContext("sch", "tab1", "foo");
         MutableSchema schema = (MutableSchema) dc.getDefaultSchema();
-        table1 = schema.getTables()[0];
+        table1 = schema.getTables().get(0);
         schema.addTable(new MutableTable("tab2").setSchema(schema));
         table2 = schema.getTableByName("tab2");
-        col1 = table1.getColumns()[0];
-        col2 = table1.getColumns()[1];
+        col1 = table1.getColumns().get(0);
+        col2 = table1.getColumns().get(1);
     }
 
     public void testSchema() throws Exception {

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/schema/MutableTableTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/metamodel/schema/MutableTableTest.java 
b/core/src/test/java/org/apache/metamodel/schema/MutableTableTest.java
index c738a2b..1e1351b 100644
--- a/core/src/test/java/org/apache/metamodel/schema/MutableTableTest.java
+++ b/core/src/test/java/org/apache/metamodel/schema/MutableTableTest.java
@@ -19,6 +19,7 @@
 package org.apache.metamodel.schema;
 
 import java.util.Arrays;
+import java.util.List;
 
 import junit.framework.TestCase;
 
@@ -53,17 +54,17 @@ public class MutableTableTest extends TestCase {
         t.addColumn(new MutableColumn("a").setType(ColumnType.VARCHAR));
         t.addColumn(new MutableColumn("r").setType(ColumnType.INTEGER));
 
-        Column[] cols = t.getColumnsOfType(ColumnType.VARCHAR);
-        assertEquals(2, cols.length);
-        assertEquals("b", cols[0].getName());
-        assertEquals("a", cols[1].getName());
+        List<Column> cols = t.getColumnsOfType(ColumnType.VARCHAR);
+        assertEquals(2, cols.size());
+        assertEquals("b", cols.get(0).getName());
+        assertEquals("a", cols.get(1).getName());
 
         cols = t.getColumnsOfType(ColumnType.INTEGER);
-        assertEquals(1, cols.length);
-        assertEquals("r", cols[0].getName());
+        assertEquals(1, cols.size());
+        assertEquals("r", cols.get(0).getName());
 
         cols = t.getColumnsOfType(ColumnType.FLOAT);
-        assertEquals(0, cols.length);
+        assertEquals(0, cols.size());
     }
 
     public void testGetIndexedColumns() throws Exception {
@@ -71,10 +72,10 @@ public class MutableTableTest extends TestCase {
         t.addColumn(new MutableColumn("b").setIndexed(true));
         t.addColumn(new MutableColumn("a").setIndexed(false));
         t.addColumn(new MutableColumn("r").setIndexed(true));
-        Column[] indexedColumns = t.getIndexedColumns();
+        List<Column> indexedColumns = t.getIndexedColumns();
         assertEquals(
                 
"[Column[name=b,columnNumber=0,type=null,nullable=null,nativeType=null,columnSize=null],
 
Column[name=r,columnNumber=0,type=null,nullable=null,nativeType=null,columnSize=null]]",
-                Arrays.toString(indexedColumns));
+                Arrays.toString(indexedColumns.toArray()));
         for (Column column : indexedColumns) {
             assertTrue(column.isIndexed());
         }

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/schema/SchemaModelTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/metamodel/schema/SchemaModelTest.java 
b/core/src/test/java/org/apache/metamodel/schema/SchemaModelTest.java
index 956f7e8..0c00277 100644
--- a/core/src/test/java/org/apache/metamodel/schema/SchemaModelTest.java
+++ b/core/src/test/java/org/apache/metamodel/schema/SchemaModelTest.java
@@ -19,6 +19,8 @@
 package org.apache.metamodel.schema;
 
 import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
 
 import org.apache.metamodel.MetaModelTestCase;
 
@@ -28,7 +30,7 @@ public class SchemaModelTest extends MetaModelTestCase {
         Schema schema = getExampleSchema();
         assertEquals("MetaModelSchema", schema.getName());
         assertEquals("Schema[name=MetaModelSchema]", schema.toString());
-        assertEquals(5, schema.getRelationships().length);
+        assertEquals(5, schema.getRelationships().size());
 
         assertEquals(4, schema.getTableCount());
         assertEquals(3, schema.getTableCount(TableType.TABLE));
@@ -47,18 +49,18 @@ public class SchemaModelTest extends MetaModelTestCase {
         assertNotNull(projectTable.getColumnByName("project_id"));
 
         assertEquals("[project_id, name, lines_of_code, parent_project_id]",
-                Arrays.toString(projectTable.getColumnNames()));
+                Arrays.toString(projectTable.getColumnNames().toArray()));
 
         assertEquals(
                 
"[Column[name=project_id,columnNumber=0,type=INTEGER,nullable=false,nativeType=null,columnSize=null],
 "
                         + 
"Column[name=lines_of_code,columnNumber=2,type=BIGINT,nullable=true,nativeType=null,columnSize=null],
 "
                         + 
"Column[name=parent_project_id,columnNumber=3,type=INTEGER,nullable=true,nativeType=null,columnSize=null]]",
-                Arrays.toString(projectTable.getNumberColumns()));
+                Arrays.toString(projectTable.getNumberColumns().toArray()));
 
         
assertEquals("[Column[name=name,columnNumber=1,type=VARCHAR,nullable=false,nativeType=null,columnSize=null]]",
-                Arrays.toString(projectTable.getLiteralColumns()));
+                Arrays.toString(projectTable.getLiteralColumns().toArray()));
 
-        assertEquals("[]", 
Arrays.toString(projectTable.getTimeBasedColumns()));
+        assertEquals("[]", 
Arrays.toString(projectTable.getTimeBasedColumns().toArray()));
 
         assertNull(projectTable.getColumnByName("foobar"));
         assertNull(projectTable.getColumnByName(null));
@@ -71,34 +73,34 @@ public class SchemaModelTest extends MetaModelTestCase {
         assertEquals(3, projectContributorView.getColumnCount());
         assertEquals(3, projectContributorView.getRelationshipCount());
 
-        Relationship[] projectContributorToContributorRelations = 
projectContributorView
+        Collection<Relationship> projectContributorToContributorRelations = 
projectContributorView
                 .getRelationships(contributorTable);
-        assertEquals(1, projectContributorToContributorRelations.length);
-        Relationship[] contributorToProjectContributorRelations = 
contributorTable
+        assertEquals(1, projectContributorToContributorRelations.size());
+        Collection<Relationship> contributorToProjectContributorRelations = 
contributorTable
                 .getRelationships(projectContributorView);
-        assertEquals(1, contributorToProjectContributorRelations.length);
-        assertTrue(Arrays.equals(projectContributorToContributorRelations, 
contributorToProjectContributorRelations));
+        assertEquals(1, contributorToProjectContributorRelations.size());
+        
assertTrue(projectContributorToContributorRelations.equals(contributorToProjectContributorRelations));
 
         assertEquals(
                 
"Relationship[primaryTable=contributor,primaryColumns=[name],foreignTable=project_contributor,foreignColumns=[contributor]]",
-                projectContributorToContributorRelations[0].toString());
+                
projectContributorToContributorRelations.iterator().next().toString());
 
-        ((MutableRelationship) 
projectContributorToContributorRelations[0]).remove();
+        ((MutableRelationship) 
projectContributorToContributorRelations.iterator().next()).remove();
         projectContributorToContributorRelations = 
projectContributorView.getRelationships(contributorTable);
-        assertEquals(0, projectContributorToContributorRelations.length);
+        assertEquals(0, projectContributorToContributorRelations.size());
         contributorToProjectContributorRelations = 
contributorTable.getRelationships(projectContributorView);
-        assertEquals(0, contributorToProjectContributorRelations.length);
+        assertEquals(0, contributorToProjectContributorRelations.size());
 
         // Get primary keys / Get foreign keys test
         assertEquals(
                 
"[Column[name=contributor_id,columnNumber=0,type=INTEGER,nullable=false,nativeType=null,columnSize=null]]",
-                Arrays.toString(contributorTable.getPrimaryKeys()));
-        assertEquals("[]", Arrays.toString(contributorTable.getForeignKeys()));
+                Arrays.toString(contributorTable.getPrimaryKeys().toArray()));
+        assertEquals("[]", 
Arrays.toString(contributorTable.getForeignKeys().toArray()));
 
         assertEquals(
                 
"[Column[name=contributor_id,columnNumber=0,type=INTEGER,nullable=false,nativeType=null,columnSize=null],
 
Column[name=project_id,columnNumber=1,type=INTEGER,nullable=false,nativeType=null,columnSize=null]]",
-                Arrays.toString(roleTable.getPrimaryKeys()));
-        Column[] foreignKeys = roleTable.getForeignKeys();
-        assertEquals(2, foreignKeys.length);
+                Arrays.toString(roleTable.getPrimaryKeys().toArray()));
+        List<Column> foreignKeys = roleTable.getForeignKeys();
+        assertEquals(2, foreignKeys.size());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/core/src/test/java/org/apache/metamodel/util/LegacyDeserializationObjectInputStreamTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/metamodel/util/LegacyDeserializationObjectInputStreamTest.java
 
b/core/src/test/java/org/apache/metamodel/util/LegacyDeserializationObjectInputStreamTest.java
index fffb679..7753539 100644
--- 
a/core/src/test/java/org/apache/metamodel/util/LegacyDeserializationObjectInputStreamTest.java
+++ 
b/core/src/test/java/org/apache/metamodel/util/LegacyDeserializationObjectInputStreamTest.java
@@ -75,13 +75,12 @@ public class LegacyDeserializationObjectInputStreamTest 
extends TestCase {
 
         final Query q = (Query) obj;
         final Table table = q.getFromClause().getItem(0).getTable();
-        final Column[] columns = table.getColumns();
 
         assertEquals("Table[name=mytable,type=TABLE,remarks=null]", 
table.toString());
         
assertEquals("Column[name=mycol1,columnNumber=0,type=INTEGER,nullable=false,nativeType=int,columnSize=16]",
-                columns[0].toString());
+                table.getColumn(0).toString());
         
assertEquals("Column[name=mycol1,columnNumber=1,type=VARCHAR,nullable=true,nativeType=text,columnSize=255]",
-                columns[1].toString());
+                table.getColumn(1).toString());
 
         assertEquals("SELECT mytable.\"mycol1\" FROM myschema.mytable WHERE 
mytable.mycol1 = 'foo'", q.toSql());
     }

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/sugarcrm/src/main/java/org/apache/metamodel/sugarcrm/SugarCrmDataContext.java
----------------------------------------------------------------------
diff --git 
a/sugarcrm/src/main/java/org/apache/metamodel/sugarcrm/SugarCrmDataContext.java 
b/sugarcrm/src/main/java/org/apache/metamodel/sugarcrm/SugarCrmDataContext.java
index 22446fc..e3908c0 100644
--- 
a/sugarcrm/src/main/java/org/apache/metamodel/sugarcrm/SugarCrmDataContext.java
+++ 
b/sugarcrm/src/main/java/org/apache/metamodel/sugarcrm/SugarCrmDataContext.java
@@ -38,7 +38,7 @@ import org.apache.metamodel.util.LazyRef;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.sugarcrm.ws.soap.EntryValue;
+import com.sugarcrm.ws.soapyxyx.EntryValue;
 import com.sugarcrm.ws.soap.GetEntriesCountResult;
 import com.sugarcrm.ws.soap.GetEntryListResultVersion2;
 import com.sugarcrm.ws.soap.LinkNamesToFieldsArray;

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/xml/src/main/java/org/apache/metamodel/xml/XmlDomDataContext.java
----------------------------------------------------------------------
diff --git a/xml/src/main/java/org/apache/metamodel/xml/XmlDomDataContext.java 
b/xml/src/main/java/org/apache/metamodel/xml/XmlDomDataContext.java
index b9936af..0d0bebb 100644
--- a/xml/src/main/java/org/apache/metamodel/xml/XmlDomDataContext.java
+++ b/xml/src/main/java/org/apache/metamodel/xml/XmlDomDataContext.java
@@ -21,13 +21,10 @@ package org.apache.metamodel.xml;
 import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
 import java.util.function.Supplier;
+import java.util.stream.Collectors;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -178,7 +175,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
     }
 
     @Override
-    public DataSet materializeMainSchemaTable(Table table, Column[] columns, 
int maxRows) {
+    public DataSet materializeMainSchemaTable(Table table, List<Column> 
columns, int maxRows) {
         loadSchema();
         List<Object[]> tableData = _tableData.get(table.getName());
         if (tableData == null) {
@@ -186,7 +183,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
                     + _tableData.keySet());
         }
 
-        final SelectItem[] selectItems = 
MetaModelHelper.createSelectItems(columns);
+        final List<SelectItem> selectItems = 
columns.stream().map(SelectItem::new).collect(Collectors.toList());
         final DataSetHeader header = new CachingDataSetHeader(selectItems);
 
         final List<Row> resultData = new ArrayList<Row>();
@@ -195,9 +192,9 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
                 break;
             }
             maxRows--;
-            Object[] dataValues = new Object[columns.length];
-            for (int i = 0; i < columns.length; i++) {
-                Column column = columns[i];
+            Object[] dataValues = new Object[columns.size()];
+            for (int i = 0; i < columns.size(); i++) {
+                Column column = columns.get(i);
                 int columnNumber = column.getColumnNumber();
                 // Some rows may not contain values for all columns
                 // (attributes)
@@ -259,7 +256,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
 
         // Remove tables from schema that has no data (typically root
         // node or pure XML structure)
-        Table[] tables = _schema.getTables();
+        List<Table> tables = _schema.getTables();
         for (Table table : tables) {
             String tableName = table.getName();
             List<Object[]> tableRows = _tableData.get(tableName);
@@ -330,8 +327,8 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
                     foreignKeyColumn.setNativeType(NATIVE_TYPE_FOREIGN_KEY);
                     table.addColumn(foreignKeyColumn);
 
-                    MutableRelationship.createRelationship(new Column[] { 
parentKeyColumn }, new Column[] {
-                            foreignKeyColumn });
+                    MutableRelationship.createRelationship(parentKeyColumn ,
+                            foreignKeyColumn );
 
                 } else {
                     foreignKeyColumn = null;
@@ -339,9 +336,9 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
             } else {
                 idColumn = getIdColumn(table);
                 tableRows = _tableData.get(tableName);
-                Column[] foreignKeys = table.getForeignKeys();
-                if (foreignKeys.length == 1) {
-                    foreignKeyColumn = (MutableColumn) foreignKeys[0];
+                List<Column> foreignKeys = table.getForeignKeys();
+                if (foreignKeys.size() == 1) {
+                    foreignKeyColumn = (MutableColumn) foreignKeys.get(0);
                 } else {
                     foreignKeyColumn = null;
                 }
@@ -401,7 +398,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
     }
 
     private Column getTextContentColumn(MutableTable table, String 
preferredColumnName) {
-        Column[] columns = table.getColumns();
+        List<Column> columns = table.getColumns();
         MutableColumn column = null;
         for (Column col : columns) {
             if (NATIVE_TYPE_TEXT.equals(col.getNativeType())) {
@@ -420,7 +417,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
     }
 
     private MutableColumn getIdColumn(MutableTable table) {
-        Column[] columns = table.getColumns();
+        List<Column> columns = table.getColumns();
         MutableColumn column = null;
         for (Column col : columns) {
             if (NATIVE_TYPE_PRIMARY_KEY.equals(col.getNativeType())) {
@@ -507,18 +504,15 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
         // Check that foreignTable is not primary table in other relationships
         // (if so we can't flatten as that would require id-rewriting of those
         // foreign tables as well)
-        if (foreignTable.getPrimaryKeyRelationships().length != 0) {
-            Relationship[] foreignPrimaryRelationships = 
foreignTable.getPrimaryKeyRelationships();
-            String[] foreignPrimaryNames = new 
String[foreignPrimaryRelationships.length];
-            for (int i = 0; i < foreignPrimaryRelationships.length; i++) {
-                foreignPrimaryNames[i] = 
foreignPrimaryRelationships[i].getForeignTable().getName();
-            }
+        if (!foreignTable.getPrimaryKeyRelationships().isEmpty()) {
+            Collection<Relationship> foreignPrimaryRelationships = 
foreignTable.getPrimaryKeyRelationships();
             throw new UnsupportedOperationException("Cannot flatten foreign 
table '" + foreignTable.getName()
-                    + "' as it acts as primary table for tables: " + 
Arrays.toString(foreignPrimaryNames));
+                    + "' as it acts as primary table for tables: " + 
foreignPrimaryRelationships.stream()
+                    .map(ftRel -> 
ftRel.getForeignTable().getName()).collect(Collectors.joining(", ")));
         }
 
-        List<Column> primaryColumns = new 
ArrayList<Column>(Arrays.asList(primaryTable.getColumns()));
-        List<Column> foreignColumns = new 
ArrayList<Column>(Arrays.asList(foreignTable.getColumns()));
+        List<Column> primaryColumns = primaryTable.getColumns();
+        List<Column> foreignColumns = foreignTable.getColumns();
 
         // Remove the surrogate id
         String primaryTableName = primaryTable.getName();
@@ -527,8 +521,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
         foreignColumns.remove(idColumn);
 
         // Remove the foreign keys
-        Column[] foreignKeys = foreignTable.getForeignKeys();
-        for (Column foreignKey : foreignKeys) {
+        for (Column foreignKey : foreignTable.getForeignKeys()) {
             foreignColumns.remove(foreignKey);
         }
 
@@ -560,7 +553,7 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
             logger.info("Tables '" + primaryTableName + "' and '" + 
foreignTableName + "' flattened to: "
                     + primaryTableName);
             if (logger.isDebugEnabled()) {
-                logger.debug(primaryTableName + " columns: " + 
Arrays.toString(primaryTable.getColumns()));
+                logger.debug(primaryTableName + " columns: " + 
Arrays.toString(primaryTable.getColumns().toArray()));
             }
         }
 
@@ -574,22 +567,20 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
      * mapped tables).
      */
     public XmlDomDataContext autoFlattenTables() {
-        Table[] tables = _schema.getTables();
-        for (Table table : tables) {
+        for (Table table : _schema.getTables()) {
             // First check to see that this table still exist (ie. has not been
             // flattened in a previous loop)
             if (_tableData.containsKey(table.getName())) {
                 // Find all tables that represent inner tags
-                Relationship[] foreignKeyRelationships = 
table.getForeignKeyRelationships();
-                if (foreignKeyRelationships.length == 1 && 
table.getPrimaryKeyRelationships().length == 0) {
-                    Relationship foreignKeyRelationship = 
foreignKeyRelationships[0];
+                Collection<Relationship> foreignKeyRelationships = 
table.getForeignKeyRelationships();
+                if (foreignKeyRelationships.size() == 1 && 
table.getPrimaryKeyRelationships().size() == 0) {
+                    Relationship foreignKeyRelationship = 
foreignKeyRelationships.iterator().next();
 
                     // If there is exactly one inner tag then we can probably
                     // flatten the tables, but it's only relevant if the inner
                     // tag only carry a single data column
                     int nonDataColumns = 0;
-                    Column[] columns = table.getColumns();
-                    for (Column column : columns) {
+                    for (Column column : table.getColumns()) {
                         String nativeType = column.getNativeType();
                         // Use the native column type constants to determine if
                         // the column is an artificial column
@@ -598,14 +589,14 @@ public class XmlDomDataContext extends 
QueryPostprocessDataContext {
                         }
                     }
 
-                    if (columns.length == nonDataColumns + 1) {
+                    if (table.getColumns().size() == nonDataColumns + 1) {
                         // If the foreign key is unique for all rows, we will
                         // flatten it (otherwise it means that multiple inner
                         // tags occur, which requires two tables to deal with
                         // multiplicity)
                         boolean uniqueForeignKeys = true;
 
-                        Column[] foreignColumns = 
foreignKeyRelationship.getForeignColumns();
+                        List<Column> foreignColumns = 
foreignKeyRelationship.getForeignColumns();
 
                         SelectItem countAllItem = SelectItem.getCountAllItem();
                         Query q = new 
Query().select(foreignColumns).select(countAllItem).from(table).groupBy(

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/xml/src/main/java/org/apache/metamodel/xml/XmlSaxDataContext.java
----------------------------------------------------------------------
diff --git a/xml/src/main/java/org/apache/metamodel/xml/XmlSaxDataContext.java 
b/xml/src/main/java/org/apache/metamodel/xml/XmlSaxDataContext.java
index f1c2d6c..217503c 100644
--- a/xml/src/main/java/org/apache/metamodel/xml/XmlSaxDataContext.java
+++ b/xml/src/main/java/org/apache/metamodel/xml/XmlSaxDataContext.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.InputStream;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.function.Supplier;
 
@@ -205,13 +206,13 @@ public class XmlSaxDataContext extends 
QueryPostprocessDataContext {
     }
 
     @Override
-    protected DataSet materializeMainSchemaTable(Table table, Column[] 
columns, int maxRows) {
+    protected DataSet materializeMainSchemaTable(Table table, List<Column> 
columns, int maxRows) {
         final XmlSaxTableDef tableDef = getTableDef(table);
 
-        final String[] valueXpaths = new String[columns.length];
-        final SelectItem[] selectItems = new SelectItem[columns.length];
-        for (int i = 0; i < columns.length; i++) {
-            final Column column = columns[i];
+        final String[] valueXpaths = new String[columns.size()];
+        final SelectItem[] selectItems = new SelectItem[columns.size()];
+        for (int i = 0; i < columns.size(); i++) {
+            final Column column = columns.get(i);
             selectItems[i] = new SelectItem(column);
             valueXpaths[i] = getXpath(tableDef, column);
         }

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/xml/src/test/java/org/apache/metamodel/xml/XmlDomDataContextTest.java
----------------------------------------------------------------------
diff --git 
a/xml/src/test/java/org/apache/metamodel/xml/XmlDomDataContextTest.java 
b/xml/src/test/java/org/apache/metamodel/xml/XmlDomDataContextTest.java
index 6985852..b5a7a02 100644
--- a/xml/src/test/java/org/apache/metamodel/xml/XmlDomDataContextTest.java
+++ b/xml/src/test/java/org/apache/metamodel/xml/XmlDomDataContextTest.java
@@ -51,7 +51,7 @@ public class XmlDomDataContextTest extends TestCase {
         try {
             XmlDomDataContext dataContext = new XmlDomDataContext(url, false);
             assertEquals("xml_input_eobjects.xml", 
dataContext.getDefaultSchema().getName());
-            assertEquals(2, dataContext.getSchemaNames().length);
+            assertEquals(2, dataContext.getSchemaNames().size());
             Schema schema = 
dataContext.getSchemaByName("xml_input_eobjects.xml");
             assertEquals("Schema[name=xml_input_eobjects.xml]", 
schema.toString());
             assertEquals(5, schema.getTableCount());
@@ -68,31 +68,30 @@ public class XmlDomDataContextTest extends TestCase {
         XmlDomDataContext dataContext = new XmlDomDataContext(file, false);
 
         assertEquals("xml_input_eobjects.xml", 
dataContext.getDefaultSchema().getName());
-        assertEquals(2, dataContext.getSchemaNames().length);
+        assertEquals(2, dataContext.getSchemaNames().size());
 
         Schema schema = dataContext.getSchemaByName("xml_input_eobjects.xml");
         assertEquals("Schema[name=xml_input_eobjects.xml]", schema.toString());
 
-        Table[] tables = schema.getTables();
         assertEquals(5, schema.getTableCount());
         assertEquals("[Table[name=eobjects.dk,type=TABLE,remarks=null], "
                 + "Table[name=contributors_person,type=TABLE,remarks=null], "
                 + 
"Table[name=contributors_person_name,type=TABLE,remarks=null], "
                 + 
"Table[name=contributors_person_address,type=TABLE,remarks=null], "
-                + "Table[name=projects_project,type=TABLE,remarks=null]]", 
Arrays.toString(tables));
+                + "Table[name=projects_project,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables().toArray()));
 
         Table table = schema.getTableByName("eobjects.dk");
         assertEquals(2, table.getColumnCount());
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=website,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Attribute,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
 
         table = schema.getTableByName("contributors_person");
         assertEquals(1, table.getColumnCount());
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
 
         table = schema.getTableByName("contributors_person_name");
         assertEquals(3, table.getColumnCount());
@@ -100,10 +99,10 @@ public class XmlDomDataContextTest extends TestCase {
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=contributors_person_id,columnNumber=1,type=INTEGER,nullable=false,nativeType=Auto-generated
 foreign key,columnSize=null], "
                         + 
"Column[name=name,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
         
assertEquals("[Relationship[primaryTable=contributors_person,primaryColumns=[id],"
                 + 
"foreignTable=contributors_person_name,foreignColumns=[contributors_person_id]]]",
-                Arrays.toString(table.getRelationships()));
+                Arrays.toString(table.getRelationships().toArray()));
 
         table = schema.getTableByName("contributors_person_address");
         assertEquals(3, table.getColumnCount());
@@ -111,10 +110,10 @@ public class XmlDomDataContextTest extends TestCase {
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=contributors_person_id,columnNumber=1,type=INTEGER,nullable=false,nativeType=Auto-generated
 foreign key,columnSize=null], "
                         + 
"Column[name=address,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
         
assertEquals("[Relationship[primaryTable=contributors_person,primaryColumns=[id],"
                 + 
"foreignTable=contributors_person_address,foreignColumns=[contributors_person_id]]]",
-                Arrays.toString(table.getRelationships()));
+                Arrays.toString(table.getRelationships().toArray()));
 
         table = schema.getTableByName("projects_project");
         assertEquals(3, table.getColumnCount());
@@ -122,7 +121,7 @@ public class XmlDomDataContextTest extends TestCase {
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=project,columnNumber=1,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=name,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Attribute,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
 
         dataContext.autoFlattenTables();
         table = schema.getTableByName("contributors_person");
@@ -130,7 +129,7 @@ public class XmlDomDataContextTest extends TestCase {
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=name,columnNumber=1,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
     }
 
     public void testExecuteQuery() throws Exception {
@@ -159,7 +158,7 @@ public class XmlDomDataContextTest extends TestCase {
 
         // Make a new query that joins the normalized tables together
         table = schema.getTableByName("contributors_person_address");
-        Relationship relationShip = table.getRelationships()[0];
+        Relationship relationShip = table.getRelationships().iterator().next();
         q = new Query().select(relationShip.getPrimaryTable().getColumns())
                 .select(relationShip.getForeignTable().getColumns()).from(new 
FromItem(JoinType.INNER, relationShip));
 
@@ -211,12 +210,12 @@ public class XmlDomDataContextTest extends TestCase {
         XmlDomDataContext strategy = new XmlDomDataContext("foobarSchema", 
document, true);
         Schema schema = strategy.getSchemaByName("foobarSchema");
         assertEquals("Schema[name=foobarSchema]", schema.toString());
-        assertEquals("[Table[name=child,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables()));
-        Table table = schema.getTables()[0];
+        assertEquals("[Table[name=child,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables().toArray()));
+        Table table = schema.getTable(0);
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=child,columnNumber=1,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
     }
 
     public void testFlattenTables() throws Exception {
@@ -227,18 +226,18 @@ public class XmlDomDataContextTest extends TestCase {
                 + "Table[name=dependency_groupId,type=TABLE,remarks=null], "
                 + "Table[name=dependency_artifactId,type=TABLE,remarks=null], "
                 + "Table[name=dependency_version,type=TABLE,remarks=null], "
-                + "Table[name=dependency_scope,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables()));
+                + "Table[name=dependency_scope,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables().toArray()));
         Table dependencyTable = schema.getTableByName("dependency");
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null]]",
-                Arrays.toString(dependencyTable.getColumns()));
+                Arrays.toString(dependencyTable.getColumns().toArray()));
         List<Object[]> dependencyData = dc
                 .materializeMainSchemaTable(dependencyTable, 
dependencyTable.getColumns(), -1).toObjectArrays();
         assertEquals(11, dependencyData.size());
         assertEquals("[1]", Arrays.toString(dependencyData.get(0)));
         assertEquals("[11]", Arrays.toString(dependencyData.get(10)));
 
-        Relationship relationship = 
schema.getTableByName("dependency_groupId").getRelationships()[0];
+        Relationship relationship = 
schema.getTableByName("dependency_groupId").getRelationships().iterator().next();
         assertEquals(
                 
"Relationship[primaryTable=dependency,primaryColumns=[id],foreignTable=dependency_groupId,foreignColumns=[dependency_id]]",
                 relationship.toString());
@@ -248,12 +247,12 @@ public class XmlDomDataContextTest extends TestCase {
         assertEquals("[Table[name=dependency,type=TABLE,remarks=null], "
                 + "Table[name=dependency_artifactId,type=TABLE,remarks=null], "
                 + "Table[name=dependency_version,type=TABLE,remarks=null], "
-                + "Table[name=dependency_scope,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables()));
+                + "Table[name=dependency_scope,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables().toArray()));
 
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=groupId,columnNumber=1,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(dependencyTable.getColumns()));
+                Arrays.toString(dependencyTable.getColumns().toArray()));
 
         dependencyData = dc.materializeMainSchemaTable(dependencyTable, 
dependencyTable.getColumns(), -1)
                 .toObjectArrays();
@@ -263,14 +262,14 @@ public class XmlDomDataContextTest extends TestCase {
 
         dc.autoFlattenTables();
 
-        assertEquals("[Table[name=dependency,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables()));
+        assertEquals("[Table[name=dependency,type=TABLE,remarks=null]]", 
Arrays.toString(schema.getTables().toArray()));
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=groupId,columnNumber=1,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=artifactId,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=version,columnNumber=3,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=scope,columnNumber=4,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(dependencyTable.getColumns()));
+                Arrays.toString(dependencyTable.getColumns().toArray()));
 
         dependencyData = dc.materializeMainSchemaTable(dependencyTable, 
dependencyTable.getColumns(), -1)
                 .toObjectArrays();
@@ -290,13 +289,13 @@ public class XmlDomDataContextTest extends TestCase {
                         + 
"Column[name=artifactId,columnNumber=2,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=version,columnNumber=3,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null], "
                         + 
"Column[name=scope,columnNumber=4,type=STRING,nullable=true,nativeType=XML 
Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
 
         table = schema.getTableByName("inceptionYear");
         assertEquals(
                 
"[Column[name=id,columnNumber=0,type=INTEGER,nullable=false,nativeType=Auto-generated
 primary key,columnSize=null], "
                         + 
"Column[name=inceptionYear,columnNumber=1,type=STRING,nullable=true,nativeType=XML
 Text,columnSize=null]]",
-                Arrays.toString(table.getColumns()));
+                Arrays.toString(table.getColumns().toArray()));
 
         // first read
         DataSet data = dc.executeQuery(new 
Query().select(table.getColumnByName("inceptionYear")).from(table)
@@ -323,10 +322,10 @@ public class XmlDomDataContextTest extends TestCase {
                 + "Machine_Hardware_Network_Adapter, 
Machine_Hardware_UART_Port, Machine_Hardware_LPT_Port, "
                 + "Machine_Hardware_AudioAdapter, 
Machine_Hardware_SharedFolders_SharedFolder, "
                 + "Machine_Hardware_Guest, 
Machine_HardDiskAttachments_HardDiskAttachment]",
-                Arrays.toString(schema.getTableNames()));
+                Arrays.toString(schema.getTableNames().toArray()));
         assertEquals(
                 "[id, OSType, lastStateChange, name, uuid, enabled, enabled, 
RAMSize, enabled, enabled, mode, value, "
                         + "enabled, type, enabled, mode]",
-                
Arrays.toString(schema.getTableByName("Machine").getColumnNames()));
+                
Arrays.toString(schema.getTableByName("Machine").getColumnNames().toArray()));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/metamodel/blob/ab5c9482/xml/src/test/java/org/apache/metamodel/xml/XmlSaxDataContextTest.java
----------------------------------------------------------------------
diff --git 
a/xml/src/test/java/org/apache/metamodel/xml/XmlSaxDataContextTest.java 
b/xml/src/test/java/org/apache/metamodel/xml/XmlSaxDataContextTest.java
index d150aac..4ee8dba 100644
--- a/xml/src/test/java/org/apache/metamodel/xml/XmlSaxDataContextTest.java
+++ b/xml/src/test/java/org/apache/metamodel/xml/XmlSaxDataContextTest.java
@@ -44,11 +44,11 @@ public class XmlSaxDataContextTest extends TestCase {
 
                final Schema schema = dc.getDefaultSchema();
                assertEquals("Schema[name=/dependencies]", schema.toString());
-               assertEquals("[/dependency]", 
Arrays.toString(schema.getTableNames()));
+               assertEquals("[/dependency]", 
Arrays.toString(schema.getTableNames().toArray()));
 
                final Table table = schema.getTableByName("/dependency");
                assertEquals("[row_id, /artifactId, /groupId, /version, 
/scope]",
-                               Arrays.toString(table.getColumnNames()));
+                               
Arrays.toString(table.getColumnNames().toArray()));
 
                // perform a regular query
                DataSet ds = dc.query().from(table).select(table.getColumns())
@@ -112,13 +112,13 @@ public class XmlSaxDataContextTest extends TestCase {
                final Schema schema = dc.getDefaultSchema();
                assertEquals("Schema[name=/root]", schema.toString());
                assertEquals("[/employee, /organization]",
-                               Arrays.toString(schema.getTableNames()));
+                               
Arrays.toString(schema.getTableNames().toArray()));
 
                // organization assertions
                final Table organizationTable = 
schema.getTableByName("/organization");
                {
                        assertEquals("[row_id, /name, @type]",
-                                       
Arrays.toString(organizationTable.getColumnNames()));
+                                       
Arrays.toString(organizationTable.getColumnNames().toArray()));
 
                        DataSet ds = dc.query().from(organizationTable)
                                        
.select(organizationTable.getColumns()).execute();
@@ -140,7 +140,7 @@ public class XmlSaxDataContextTest extends TestCase {
                {
                        assertEquals(
                                        "[row_id, /name, /gender, 
index(/root/organization/employees), index(/root/organization)]",
-                                       
Arrays.toString(employeeTable.getColumnNames()));
+                                       
Arrays.toString(employeeTable.getColumnNames().toArray()));
 
                        DataSet ds = dc.query().from(employeeTable)
                                        
.select(employeeTable.getColumns()).execute();

Reply via email to