cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cris Daniluk" <cris.dani...@gmail.com>
Subject Re: Setup hsqldb tables in memory?
Date Thu, 02 Nov 2006 20:30:13 GMT
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 <andrus@objectstyle.org> 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
>
>

Mime
View raw message