I have the following domain of type polygon
in the database:
CREATE DOMAIN "global".polygon AS pg_catalog.polygon;
The following table that uses this domain:
CREATE TABLE user.area_geom
(
id_area_geom serial NOT NULL,
polygon global.polygon
);
And the following class that extends DBTestCase
by setting the dataset before the tests are run:
public abstract class MyDBTestCase extends DBTestCase {
public MyDBTestCase () {
// Configura url, user, password e driver do banco de dados.
}
@Override
protected IDataSet getDataSet() throws Exception {
// Meu arquivo .xml com os dados de teste.
return new FlatXmlDataSetBuilder()
.build(new FileInputStream(MyTestDB.FLAT_XML_DATASET));
}
@Override
protected void setUpDatabaseConfig(DatabaseConfig config) {
/* Habilita case sensitive para os nomes de tabelas do banco */
config.setProperty(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES,
true);
/* Habilita a utilização de fully qualified names para tabelas */
config.setProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, true);
/* Configura o tipo de dado para o PostgreSQL */
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
new PostgresqlDataTypeFactory());
}
}
This setup works perfectly for all commonly used data types, but when I mapped the area_geom
table that contains a polygon
domain, the console started generating the following output:
9081 [main] WARN org.dbunit.util.SQLHelper - area_geom.polygon data type (1111, 'polygon') not recognized and will be ignored. See FAQ for more information.
In the FAQ proposed by the error message, there is nothing to tell me how to implement a data type " custom "over an existing data type, or make DbUnit recognize my polygon
, I've spent a few hours of Google and found nothing.
Does anyone have any light for this problem?