diff --git a/datagear-meta/src/main/java/org/datagear/meta/resolver/AbstractDevotedDBMetaResolver.java b/datagear-meta/src/main/java/org/datagear/meta/resolver/AbstractDevotedDBMetaResolver.java index 647cd6bc..49bf08dc 100644 --- a/datagear-meta/src/main/java/org/datagear/meta/resolver/AbstractDevotedDBMetaResolver.java +++ b/datagear-meta/src/main/java/org/datagear/meta/resolver/AbstractDevotedDBMetaResolver.java @@ -165,7 +165,7 @@ public abstract class AbstractDevotedDBMetaResolver extends JdbcSupport implemen DatabaseMetaData metaData = getDatabaseMetaData(cn); String schema = getSchema(cn, metaData); - return getColumns(cn, metaData, schema, catalog, tableName, null); + return getColumns(cn, metaData, catalog, schema, tableName, null); } @Override diff --git a/datagear-meta/src/test/java/org/datagear/meta/GenericDBMetaResolverTest.java b/datagear-meta/src/test/java/org/datagear/meta/GenericDBMetaResolverTest.java index 1dfd49b6..dccd68a3 100644 --- a/datagear-meta/src/test/java/org/datagear/meta/GenericDBMetaResolverTest.java +++ b/datagear-meta/src/test/java/org/datagear/meta/GenericDBMetaResolverTest.java @@ -9,6 +9,7 @@ import static org.hamcrest.collection.ArrayMatching.arrayContaining; import static org.hamcrest.collection.ArrayMatching.hasItemInArray; import static org.hamcrest.core.IsIterableContaining.hasItem; import static org.hamcrest.text.IsEqualIgnoringCase.equalToIgnoringCase; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import java.sql.Connection; @@ -78,4 +79,16 @@ public class GenericDBMetaResolverTest extends DBTestSupport hasItemInArray(hasProperty("columnNames", arrayContaining(equalToIgnoringCase("ACCOUNT_ID"))))); } } + + @Test + public void getColumnsTest() throws Exception + { + Column[] columns = this.genericDBMetaResolver.getColumns(this.connection, "T_ACCOUNT"); + + assertEquals(4, columns.length); + assertThat(columns[0].getName(), equalToIgnoringCase("ID")); + assertThat(columns[1].getName(), equalToIgnoringCase("NAME")); + assertThat(columns[2].getName(), equalToIgnoringCase("HEAD_IMG")); + assertThat(columns[3].getName(), equalToIgnoringCase("INTRODUCTION")); + } }