I use a slightly m more configured version. We use HSQLDB for our
in-memory unit tests, off the same schema we use on Oracle... so I had
to tune some of the generator settings a bit to disable things not
supported in HSQLDB:

DriverDataSource dataSource = new DriverDataSource(new jdbcDriver(),
"jdbc:hsqldb:mem:app", "sa", "");
DbGenerator generator = new DbGenerator(new HSQLDBAdapter(), dataMap);
generator.setShouldCreateFKConstraints(false);
generator.setShouldCreatePKSupport(true);
generator.setShouldCreateTables(true);
generator.setShouldDropPKSupport(false);
generator.setShouldDropTables(false);
generator.runGenerator(dataSource);

(some of the settings above are actually defaults)

Cris

On 11/2/06, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
Here is the latest code example used in our integration tests. Works
with any DB, including HSQLDB in-memory URL mentioned earlier:

http://tinyurl.com/y6ekbs

Andrus


Reply via email to