开发者

Does iBatis have any analog of Hibernate's `hbm2ddl` for integration testing with in-memory database?

I'm considering adding integration tests to a Java-Struts-Spring-iBatis-Oracle legacy application.

In the past I've used HSQL as an in-memory database for integration tests for applications that used Hibernate as an ORM. With Hibernate's hbm2ddl, it can automatically create the table structure in HSQL when integration tests are run.

Is it possible to do this with iBatis? Or is it necessary to run SQL scripts to create table?开发者_开发知识库

(In that case, I'm curious if there is a reasonable way to maintain this script. Since Oracle and HSQL have significant syntax differences.)


HSQLDB 2.2.5 and later has an Oracle syntax mode and supports a lot of Oracle table defintion syntax. This covers type name differences, functions, default clauses etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜