Testing Hibernate Modules with Multiple Database Directories

I have a problem testing a Hibernate application that requests multiple directories / schemas.

The production database is Sybase and, in addition to the objects mapped to the default directory / schema, two objects are displayed, as shown below. Thus, there are three directories.

@Table(catalog = "corp_ref_db", schema = "dbo", name = "WORKFORCE_V2")
public class EmployeeRecord implements Serializable {
}

@Table(catalog = "reference", schema = "dbo", name="cntry")
public class Country implements Serializable {
}

All this works in the application without any problems. However, when the unit check of my usual strategy is to use HSQL with the hibernate ddl flag set to auto, and dbunit populates the tables.

All this works great when all the tables are in the same schema.

However, by adding these additional tables, testing is violated because the DDL will not work because HSQL only supports one directory.

create table corp_ref_db.dbo.WORKFORCE_V2
user lacks privilege or object not found: CORP_REF_DB

, , , , , HSQL , :

- , , - HSQL.

orm.xml, ( , / ), , , , DDL , .. , .

, - , , - / .

. ?

+3
1

H2 . , .

0

All Articles